swagger里面测试List数据格式

如下,由[ ]开始,不是{ }。

[{"sellerCode":8800233325,"msgCount":110,"serviceName":"guanh"},

{"sellerCode":8800233325,"msgCount":110,"serviceName":"guanh"},

{"sellerCode":8800013279,"msgCount":110,"serviceName":"guanh"},

{"sellerCode":88000,"msgCount":110,"serviceName":"guanh"},

{"sellerCode":8800233325,"msgCount":11,"serviceName":"guanh"}]

 

这里的场景是 入参是一个list的dto,在swagger里自测的时候默认是{} 开始,报错,需要改成[ ]在最外层。

 

{"girdCodeList": [
"CMI48510","CMI45940"
],
"months": [
"2020-09","2020-11","2020-12"
]
}

 

这个场景是dto里的list

posted @ 2020-08-06 14:42  了悟  阅读(1690)  评论(0编辑  收藏  举报