fix(oas3): reset request body values in try it out#9717
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. |
## [5.26.1](v5.26.0...v5.26.1) (2025-07-07) ### Bug Fixes * **oas3:** reset request body values in try it out ([#9717](#9717)) ([32dd3af](32dd3af))
|
🎉 This PR is included in version 5.26.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [5.26.1](swagger-api/swagger-ui@v5.26.0...v5.26.1) (2025-07-07) ### Bug Fixes * **oas3:** reset request body values in try it out ([swagger-api#9717](swagger-api#9717)) ([32dd3af](swagger-api@32dd3af))



Refs #9158
Supersedes #9346