Skip to content

Regression: Responses without content are displayed with empty Schema and Example Value #5453

@hkosova

Description

@hkosova

Q&A (please complete the following information)

  • OS: Windows 10
  • Browser: any
  • Method of installation: https://editor.swagger.io
  • Swagger-UI version: 3.23.0
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

Example Swagger/OpenAPI definition:

openapi: 3.0.2
info:
  title: Response without a schema
  version: 1.0.0
paths:
  /foo:
    get:
      responses:
        '200':
          description: OK

Describe the bug you're encountering

Responses without content are now displayed with empty "Example Value" and "Schema" sections. This is a regression introduced in v. 3.23.0 by /pull/5427.

Expected behavior

Responses without content should NOT have the "Example Value" and "Schema" sections.

Screenshots

Empty "Example Value" and "Schema" sections in a response

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