Skip to content

Swagger UI doesn't seem to support Arrays yet? #982

Closed
@johnhamelink

Description

@johnhamelink

Hey there,

Please excuse my relative ignorance, I'm using Swagger within the context of a rails app and I'm not particularly up to date with where swagger's UI is in comparison with swagger's spec. I wanted to ask, has the UI implemented the Array type? I want to be able to define an API with parameters that would resolve to this in the API:

foo[]=1&foo[]=2&foo[]=3

In grape-swagger-rails I'm able to define a parameter as such:

requires :foo, type: Array[Integer], desc: 'An Array of Foos'

grape-swagger-rails (I think it's that gem which does this) renders the following JSON spec:

Imgur

And Swagger UI renders the output like this:

Imgur

When it queries the API, it generates the following url:

http://localhost/example?foo=1

Which of course works, but isn't helpful for allowing people to test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions