-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(oas3): reset request body values in try it out #9717
base: master
Are you sure you want to change the base?
Conversation
There's an issue with getting different default values on loading try it out and on resetting it. After clicking on reset: It seems like it's because we have a different logic for getting these values. For the first case, starting here:
and when resetting:
The first case doesn't get us examples for the parameters that don't have them in schema, while the second one gets them (as, for example, "string" for string type parameters). This looks like a separate issue to me and we should decide which way of getting values should be the correct one, and apply a fix for it in a separate PR. Because we're using the second method for resetting, and because it uses swagger-ui/src/core/plugins/json-schema-5-samples/fn/index.js Lines 251 to 253 in 6bb810a
If we have a specification with maxProperties like this:
and we use reset, only the |
One test is not passing. |
Refs #9158
Supersedes #9346