Skip to content

allowMultiple not working with Swagger UI? #487

@gbisaga

Description

@gbisaga

Hi, I am wondering if allowMultiple is a working (or recommended) way to document an API using swagger UI. I am creating a new API that originally used a repeating query string parameter to support rails/PHP/HTML style (http://server/resource?foo[]=a&foo=b).

Then I found this was not supported in Swagger, so I changed it to use allowMultiple and comma-separated syntax (http://server/resource?foo=a,b).

So, I documented my API:

                  {
                     "name":"geography",
                     "description":"Geography values to return",
                     "required":false,
                     "type":"integer",
                     "paramType":"query",
                     "allowMultiple":true
                  },

But the swagger UI only displays a single text box. I have tried putting a space and a comma in the input field, but swagger UI URL encodes these and passes them. Is there any way to make the UI either display multiple boxes or (more likely) understand a separator string?

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