你好,
如何将@ApiOperation注释的 responseType 属性设置为对象列表?
在 swagger-core 1.2.x 中:
responseClass = "com.yourpackage.YourModel", multiValuedResponse=true
在 swagger-core 1.3-x 中:
response = YourModel.class, responseContainer="List"
后者的优点是它是类型安全的。
嗨,我正在使用 responseContainer = "List",但在 swagger UI 上显示的是 List[$ObjectDesc]。 有什么建议吗? 当我尝试使用 responseContainer="Array" 时的情况相同
@vvicario - 如果您有问题,请打开一个单独的问题。
最有用的评论
在 swagger-core 1.2.x 中:
在 swagger-core 1.3-x 中:
后者的优点是它是类型安全的。