OpenAPITools / OpenAPITools/openapi-generator
[BUG] Typescript generated code does not pass bearer token in HTTP headers
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Typescript generated code does not pass bearer token in HTTP headers.
openapi-generator version
5.0.0
OpenAPI declaration file content or url
It's a closed source project, I can't post here. Sorry.
Generation Details
npx @openapitools/openapi-generator-cli generate -i ../../wwwroot/swagger-original.json -g typescript-axios -o ../src/api-client/
Steps to reproduce
Execute the command in previous paragraph.
Suggest a fix
Set the bearer token in HTTP headers.
Best regards,
Giacomo Stelluti Scala
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
Start with the typescript-axios generator using the reported npx @openapitools/openapi-generator-cli generate command; the closed-source OpenAPI declaration is required to reproduce the problem. Trace how bearer authentication is represented in the generated client, and consider the issue done when generated requests include the bearer token in their HTTP headers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100