Swagger-core: リストとしてresponseClassを使用した@ApiOperation<t/>

作成日 2013年07月23日  ·  3コメント  ·  ソース: swagger-api/swagger-core

やあ、

@ApiOperationアノテーションのresponseType属性をオブジェクトのリストとして設定するにはどうすればよいですか?

最も参考になるコメント

swagger-core 1.2.xの場合:

responseClass = "com.yourpackage.YourModel", multiValuedResponse=true

swagger-core 1.3-xの場合:

response = YourModel.class, responseContainer="List"

後者の利点は、タイプセーフであるということです。

全てのコメント3件

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-問題がある場合は、別の問題を開いてください。

このページは役に立ちましたか?
0 / 5 - 0 評価