Skip to content

Changing Content Type Cause Errors in the Example #10738

@Albador

Description

@Albador

Describe the bug you're encountering

When I switch the content type from application/x-www-form-urlencoded to application/json after i clicked Try it out the generated example contains errors.

To reproduce...

Steps to reproduce the behavior:

  1. Go to https://editor.swagger.io/
  2. Load the Example Petstore OpenAPI 3.1
  3. Click on the first Endpoint (updatePet) to expand it
  4. Set the content type to application/x-www-form-urlencoded
  5. Click Try it out
  6. Set the content type to application/json
  7. Now you can see the errors in the generated example
  8. When you click on Reset everything looks good again

Expected behavior

There should be no errors in the generated examples.

Screenshots

Image

Additional context or thoughts

  • The error occurs from version v5.29.0 onwards
  • We were able to reproduce the error in Firefox, Edge, and Chrome
  • The error is independent of the specific OpenAPI documentation. It appears to occur in the frontend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions