0

I have implemented a swagger with an endpoint which has an array query parameter type:

- name: "exactType"
  in: "query"
  description: "Exact types of the Refund Point"
  required: false
  type: "array"
  items:
    type: "string"

Which looks like this in swagger ui:

array query parameter in swagger ui

And I don't know how to provide values here correctly to the text area.

I can do a successful call with postman if I define the types like this:

GET .../myproject?types=type1&types=type2&types=type3

In this case the array function works fine in the backend. But I cannot make a successful call with multiple values using Swagger UI.

I have tried with linebrake, comma in the text area, but non of them worked. How can I solve this?

Thank you!

2
  • 1
    Add collectionFormat: multi to your parameter, and enter the values one per line in Swagger UI. See the ^^ linked question for more information. Commented Feb 6, 2019 at 19:05
  • I could not find that solution, thanks for the link! Commented Feb 7, 2019 at 10:22

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.