如何在postman中发送get请求查询参数中的字符串数组

如何在postman中发送get请求查询参数中的字符串数组,get,yaml,postman,postman-mocks,Get,Yaml,Postman,Postman Mocks,我有一个带有集合的postman模拟服务器,其中一个请求的参数类型为array 以下是API ymal文件中此查询参数的定义: - name: departureAirports required: false in: query explode: true schema: type: array items: type: string

我有一个带有集合的postman模拟服务器,其中一个请求的参数类型为
array

以下是API ymal文件中此查询参数的定义:

- name: departureAirports
          required: false
          in: query
          explode: true
          schema:
            type: array
            items:
              type: string
              pattern: ^[A-Z]{3}$
当我从邮递员处发送此请求时,其值如下
[“123”]

,我得到了这个错误:

查询参数“departureAirports”需要为数组类型,但我们发现“[“123”]”


那么,如何在get请求中发送查询参数中的字符串数组呢?

您可以像这样发送参数数组的值

departureAirports[1]:1
departureAirports[2]:2
departureAirports[3]:3
 

您可以将api中的参数作为api url中的查询字符串发送