Description
Setting up an API that uses a bearer token should result in clients that send the Bearer XXXX value in the Authorization header. However the javascript and typescript-node clients generate code that wants to send a username/password combination in the header.
openapi-generator version
3.2.3
OpenAPI declaration file content or url
components:
securitySchemes:
bearerAuth: # arbitrary name for the security scheme
type: http
scheme: bearer
bearerFormat: JWT
Full sample: https://gist.github.com/johnkoerner/952becd82bbb238b51907791d0a13d32
Command line used for generation
openapi-generator generate -i Test.yaml -g typescript-node -o ./ts
Steps to reproduce
Generate a typescript-node or javascript client that uses authentication with the bearer scheme.
Suggest a fix/enhancement
When the bearer scheme is specified, then the Authorization header should be specified with the Bearer {accessToken} format. It appears that the OAuth2 flow already supports the Bearer token format.
Note: I only tested with javascript and typescript-node other client generators may have similar issues.
Description
Setting up an API that uses a bearer token should result in clients that send the
Bearer XXXXvalue in the Authorization header. However thejavascriptandtypescript-nodeclients generate code that wants to send a username/password combination in the header.openapi-generator version
3.2.3
OpenAPI declaration file content or url
Full sample: https://gist.github.com/johnkoerner/952becd82bbb238b51907791d0a13d32
Command line used for generation
Steps to reproduce
Generate a typescript-node or javascript client that uses authentication with the
bearerscheme.Suggest a fix/enhancement
When the
bearerscheme is specified, then theAuthorizationheader should be specified with theBearer {accessToken}format. It appears that the OAuth2 flow already supports theBearertoken format.Note: I only tested with
javascriptandtypescript-nodeother client generators may have similar issues.