-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Open
Labels
Description
Q&A (please complete the following information)
- OS: Windows 10
- Browser: Chrome
- Version: 79.0.3945.130 (Official Build) (64-bit)
- Method of installation:
https://unpkg.com/swagger-ui-dist/ - Swagger-UI version: 3.25.0
- Swagger/OpenAPI version: OpenAPI 3
Content & configuration
Minimal Example - https://keyz182.github.io/swagger_ui_bug/
SwaggerUI Init - https://github.com/keyz182/swagger_ui_bug/blob/9503ca4b04e9319536392229be641df915fb606a/index.html#L41
OpenAPI Yaml - https://github.com/keyz182/swagger_ui_bug/blob/master/openapi.yaml
Describe the bug you're encountering
When changing between request body content types, non form based bodies get stuck on the last one to be selected.
To reproduce...
Expected behavior
The editable request body box should show the appropriate content.
Additional context or thoughts
We have different schemas for different content types to support JSON API, along with other types. JSON API requires a very specific body type.
May be related to #3448 as it can manifest in an apparently similar manner, though selecting XML first does actually show XML.