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
Assume an api support multiple content types (json & xml)
Currently if we set default value for the post body, then automatically option for content-type selection is removed in the current version of the swagger UI
This issue to support default value for multiple content types also enable content type selection even if it has a default value
The text was updated successfully, but these errors were encountered:
This one is challenging. Let's clarify that the default value is actually intended as the value used by the server when none is provided by the client, the example is intended to provide an actual input example.
The problem is that the ability to describe a structure based on mime type is only available for responses and not requests. For requests, you can only assign examples for definitions which affect body parameters, and even there you can't set it per mime type. This is a limitation of the spec which we'd need to resolve. I've opened a ticket for it so we can follow up on it - OAI/OpenAPI-Specification#418.
We may solve it using vendor extensions for now as workaround.
For now, I'll close the issue as we simply can't deal with it as-is.
The text was updated successfully, but these errors were encountered: