You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I understand the need, but that's outside the goal of swagger. The response model definition cannot vary based on content-type.
You CAN, however, return different models depending on the response code. So a HTTP 299 code, for example (not suggesting that you use that code) can return a completely different model.
#77 allows to specify an array of response content types.
But there is no way to specify a specific reponse class for each content type.
The use case is an operation producing both
application/json
andapplication/hal+json
and not having the same response classes.Now the only way to achieve that is to create 2 separate operations each having only one response content type :
but this appears as 2 different operations in the UI.
It would be more useful to have something like :
The text was updated successfully, but these errors were encountered: