swagger-api / swagger-api/swagger-ui

Authorization Header not getting displayed in CURL

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

Nobody has claimed this yet.

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

Description

I am trying to use the Authorization header in the swagger latest version.
You can try the above YAML configuration in Swagger Editor.

You can observe that the Authorization header which I added in the header section is not included in the CURL command.

openapi.txt

Help me to add an Authorization header into my API.

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 attached openapi.txt in Swagger Editor and reproduce the missing Authorization header in the generated CURL command. Compare the header configuration with the resulting request and confirm the fix by checking that the Authorization header appears in the generated CURL output.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi
Domain
api, authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.