1

I have postman mock server with collection, and one of the requests has parameter with type array.

Here is the definition for this query parameter in the API ymal file:

- name: departureAirports
          required: false
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
              pattern: ^[A-Z]{3}$

When I send this request from postman with value like this ["123"]

enter image description here

, I got this error:

The query parameter "departureAirports" needs to be of type array, but we found "["123"]"

enter image description here

So, How can I send array of strings in the query parameters in get request ?

1 Answer 1

1

You can send the value of parameter departureAirports array like

departureAirports[1]:1
departureAirports[2]:2
departureAirports[3]:3
 
Sign up to request clarification or add additional context in comments.

2 Comments

you can send the parameters in api as
query string in api url

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.