swagger-api / swagger-api/swagger-ui

Swagger-UI 5.1.0: Example Value box displayed for Response Object with only description.

Open
#8,975 4 comments 2 reactions 1 assignee View on GitHub

@char0n is already working on this.

Since Aug 17, 2023.

cat: user experience type: regression version: 5.x
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A (please complete the following information)
  • Swagger-UI version: 5.1.0
  • Swagger/OpenAPI version: OpenAPI 3.1

Looks similar to #5453.
Does not happen on Swagger-UI 4.

If I have a response object like this, with only description, it shows an Example Value box with "string" value:

401:
    description: Unauthorized

image

On Swagger-UI 4 only the description is visible, without the Example Value box.

Not sure if this is a regression or an intended feature.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.