[typescript-axios] Generating bearerAuth create Basic auth instead
Created by: chattersley
Description
Attempting to generate from an openapi definition with bearerAuth marked as the security schema. When it generates using axios-typescript it generates Basic auth security instead? It does generate a comment referencing Bearer auth but no code to add the header.
openapi-generator version
"@harmowatch/openapi-generator-cli": "0.0.3-3.3.2"
OpenAPI declaration file content or url
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
This generates
// authentication bearerAuth required
// http basic authentication required
if (
configuration &&
(configuration.username || configuration.password)
) {
localVarHeaderParameter["Authorization"] =
"Basic " +
btoa(configuration.username + ":" + configuration.password);
}
Command line used for generation
Generating through npm. npm=6.2.0 node=v10.9.0 "generate": "openapi-generator generate -i api/myapi.yaml -g typescript-axios -o generated-sources/myapi"
Steps to reproduce
Running generate commmand.