swagger-api / swagger-api/swagger-codegen
[Typescript] Different auth header per request
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I am building a server which receives requests from many clients and makes requests to another server. I would like to forward the oauth2 token the client sent me to the other server.
I could create a new client per request, but I would like to pass the authorization header per request.
Can I do that?
Edit
Can I do that with different headers?
Swagger-codegen version
2.3.1
Suggest a fix/enhancement
If this isn't possible, add an optional argument to each request that allows passing headers for this specific request (and not change the default)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by locating the TypeScript client templates and the generated request entry points, then check how default headers are applied. Done means a caller can supply headers for one request, including forwarding an OAuth2 authorization header, without changing the client's defaults; add coverage for that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100