2016-11-09 21 views
0

我的应用程序有可能采取类似无限查询参数

<baseURL>/path?filter={value}&filter={value1}&filter={value2}&....filter={value999}

无限查询参数我该如何记录这对我的YAML文件,并使用代码生成招摇创建API?

in: query 
name: template_id 
description: some 
required: false 
type: array 
items: 
    type: int64 

这会给我一个范围为<baseURL>/path?filter={1,2,3...n} 这是做到这一点的唯一方法:

我通过以下YAML模板来的?

回答

1

collectionFormat: multi产生查询字符串参数为filter={value}&filter={value1}&...

in: query 
name: template_id 
description: some 
required: false 
type: array 
items: 
    type: int64 
collectionFormat: multi