Open glowcloud opened 6 months ago
Investigating a different issue, I found this https://github.com/swagger-api/swagger-ui/blob/f91ca8237eec4bf92fc6da9e1697810c8f25f1cc/src/core/components/parameters/parameters.jsx#L79-L93 It seems like right now this is an expected behaviour so that we don't override the user's changes if they edited any values. If the user wants the default value for the content type they switched to, they have to click on the reset button.
Is this something that we would like to change or is this behaviour fine?
Describe the bug you're encountering
Request body value in try it out isn't being updated when switching to a different content type, if the value was edited.
To reproduce...
Steps to reproduce the behavior:
/pet
PUT requestapplication/xml
content typeThe same thing will happen if we edit
application/xml
first and then switch toapplication/json
.Expected behavior
The value should switch to the default value for the current content type.
Screenshots
When switching from
application/json
toapplication/xml
:When switching from
application/xml
toapplication/json
: