swagger-api / swagger-api/swagger-ui

`Header.examples` is ignored

Open
#5,432 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: rendering specification: 3.x type: feature
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Content & configuration

Example Swagger/OpenAPI definition:

openapi: 3.0.0

paths:
  /:
    get:
      responses:
        "200":
          description: OK!
          headers:
            X-Rate-Limit-Remaining:
              schema:
                type: number
              description: API rate limit
              examples:
                HasMoreLeft:
                  value: 9999
                  description: A positive integer indicates that the user can continue making API calls
                LimitReached:
                  value: 0
                  description: Zero indicates that the user cannot continue making API requests
Expected behavior

My Header examples should be visible!

Additional context or thoughts

#5427.

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 with the supplied OpenAPI 3.0 definition and trace how Swagger UI renders response headers and their examples; the issue names no file or test. Review related issue #5427, then verify that both named header examples are visible in the rendered documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.