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
mathis-m
changed the title
requestBody Try-out should use content-type
requestBody sample Try-out should use content-type to generate matching example if switched.
Oct 6, 2020
* When the media-type is changed, there is a new `onChangeMediaType` method to handle actions.
* If target schema properties key/value pairs does NOT equals current schema properties, clear the requestBodyValue, try-it-out request/response and validation params.
* If target schema properties key/value pairs DOES equals current schema properties, do not change or re-render schema properties
* oas3Selector `validateShallowRequired` now also validates required keys against target media-type
Fixes#6201, #6250, #6476
Q&A (please complete the following information)
OS: [e.g. macOS] Windows 10 Pro
Browser: [e.g. chrome, safari] chrome
Version: [e.g. 22] Version 85.0.4183.102 (Official Build) (64-bit)
Method of installation: [e.g. npm, dist assets] raw code
Swagger-UI version: [e.g. 3.10.0] master
Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0] 3.0.1
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
Go into requestBody try out mode. Switch the content-type.
Example will not be updated to respect content-type.
To reproduce...
Open yaml at editor and try out and switch content-type.
Expected behavior
Should use current example-value to generate new example for content-type, when new content-type is selected.
The text was updated successfully, but these errors were encountered: