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 ?

Mohamed Amer
  • 429
  • 1
  • 4
  • 18

1 Answers1

1

You can send the value of parameter departureAirports array like

departureAirports[1]:1
departureAirports[2]:2
departureAirports[3]:3
 
Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39
Prabha Rajan
  • 70
  • 1
  • 4