Skip to content

OpenAPI 3.x: request body doesn't update when changing between content type in try it out #9699

@glowcloud

Description

@glowcloud

Describe the bug you're encountering

Request body value in try it out isn't being updated when switching to a different content type, if the value was edited.

To reproduce...

Steps to reproduce the behavior:

  1. Go to https://petstore3.swagger.io/
  2. Click on /pet PUT request
  3. Click on try it out button
  4. Edit the value
  5. Switch to application/xml content type
  6. See that the value didn't update

The same thing will happen if we edit application/xml first and then switch to application/json.

Expected behavior

The value should switch to the default value for the current content type.

Screenshots

When switching from application/json to application/xml:

Screenshot 2024-03-14 at 14 53 20

When switching from application/xml to application/json:

Screenshot 2024-03-14 at 14 54 32

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions