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
With changes in #9762, we're introducing support for getting examples for schemas from oneOf and anyOf schemas for request body with content type application/x-www-form-urlencoded and multipart/form-data.
If we don't have any other properties in the schema, we will overwrite it with the first oneOf/anyOf schema, so that we can have properties like type, format, etc.
If we have other properties, we won't be overwriting them so that we don't lose anything from the parent schema. We will still get an example but we can have a situation where other properties, like type, are actually defined in the nested schema, and our input for it will look like this:
instead of:
We should add support for the case where we have other properties in the parent schema.
The text was updated successfully, but these errors were encountered:
glowcloud
changed the title
OpenAPI 3.x: add support for getting example values in request body for schemas with anyOf and allOf keywords
OpenAPI 3.x: add support for getting example values in request body for schemas with anyOf and allOf keywords when there are other properties
Mar 28, 2024
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
With changes in #9762, we're introducing support for getting examples for schemas from
oneOf
andanyOf
schemas for request body with content typeapplication/x-www-form-urlencoded
andmultipart/form-data
.If we don't have any other properties in the schema, we will overwrite it with the first
oneOf
/anyOf
schema, so that we can have properties like type, format, etc.If we have other properties, we won't be overwriting them so that we don't lose anything from the parent schema. We will still get an example but we can have a situation where other properties, like type, are actually defined in the nested schema, and our input for it will look like this:
instead of:
We should add support for the case where we have other properties in the parent schema.
The text was updated successfully, but these errors were encountered: