swagger-api / swagger-api/swagger-ui

Response headers visually not marked required

Open
#6,020 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A (please complete the following information)
  • OS: Windows 10
  • Browser: Firefox
  • Version: 68.8.0esr
  • Method of installation: unpkg.com
  • Swagger-UI version: //unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js
  • Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration

Example Swagger/OpenAPI definition:

components:
  responses
    recordCreated:
      description: The item record has been created
      headers:
        Location:
          $ref: "#/components/headers/location"
        ETag:
          $ref: "#/components/headers/etag"
  headers:
    etag:
     description: The entity tag identifying a resource's representational state.
     required: true
     schema:
       type: string
    location:
      description: The URI which points to resource location.
      schema:
        type: string
        format: uri
Describe the bug you're encountering

The response header required property is visually not reflected in the rendered web UI

Expected behavior

I expected to see an asterisk or similar just like for request headers

Screenshots

grafik

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.

Research direction

Start by loading the provided OpenAPI 3.0 definition in Swagger UI and comparing the rendered response headers with request headers. Trace the response-header rendering entry point and make the required ETag header visibly marked like required request headers; done when the example shows that distinction consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.