Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model tab displays a copy of the response description in certain cases #5459

Closed
hkosova opened this issue Jul 12, 2019 · 1 comment
Closed

Comments

@hkosova
Copy link
Contributor

hkosova commented Jul 12, 2019

Q&A (please complete the following information)

  • OS: Windows 10
  • Browser: any
  • Method of installation: dist assets
  • Swagger-UI version: 3.22.3
  • Swagger/OpenAPI version: OpenAPI 2.0

Content & configuration

Example Swagger/OpenAPI definition:

swagger: "2.0"
info:
  title: OAS2 response examples
  version: 1.0.0
paths:
  /foo1:
    get:
      summary: Response without a schema but with examples
      produces:
        - application/json
      responses:
        200:
          description: Successful response
          examples:
            application/json:
              foo: bar

Describe the bug you're encountering

The "Model" tab of the response displays a copy of the response description. This makes it look as if the response schema is an object containing the description property, and may confuse the documentation users.

This issue cannot be tested in the latest version 3.23.0 because of #5458.

Expected behavior

If the response does not have schema, the "Model" tab should be empty or should not be displayed at all.

Screenshots

image

@hkosova
Copy link
Contributor Author

hkosova commented Aug 7, 2019

This seems to have been fixed in the latest version, 3.23.4 (possibly fixed as part of #5458).

image

@hkosova hkosova closed this as completed Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant