我一直在费劲地阅读文档,并试图使用swagger成功地通过列表或整数数组,因为我正在尝试测试API。
[我正在尝试通过这样的teamID列表:(请注意,我一直在尝试各种变体,但是调试时值仍然没有通过]
{
"type": "array",
"items": {
"type": "integer",
"enum": [
1,
2,
3
]
}
我使用“枚举”,因为它是我尝试传递的值列表。
这里也是我的招摇方法的屏幕截图:
作为整数数组的查询参数定义如下:
{
"in: query",
"name": "teamIDs",
"type": "array",
"items": {
"type": "integer"
}
}
在您的Swagger UI中,输入teamIDs
参数的值每行一个],如下所示:
1
2
3