Swagger (2.0) では、 path と operation から response の型が一意に決まる
Published: 2019/11/26
https://swagger.io/docs/specification/2-0/paths-and-operations/
上記のページを読んでいて、そこに以下のような記述があった。
This is because Swagger considers a unique operation as a combination of a path and the HTTP method, and additional parameters do not make the operation unique.
また、次のページには、以下のような記述がある。
https://swagger.io/docs/specification/2-0/describing-responses/
Can I have different responses based on a request parameter? No.
というわけで、 swagger の、少なくとも 2.0 時点では、 path と operation を定めたら、 response の型は一意に定まるように設計するべき。
Tags: swagger
Gitlab では、 IPlantUML の出力結果をレンダリング出来ない。
AttributeError: module 'socketio' has no attribute 'Client' の対処方法
関連記事
OpenAPI では rails のクエリパラメータの完全サポートはできない
2021/10/29