Description
The generated authentication configuration file configuration.ts has compile error if the apikey name contains dash -.
https://github.com/wing328/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/TypeScript-Fetch/configuration.mustache#L5
securityDefinitions:
APIKeyHeader:
type: apiKey
in: header
name: X-API-Key
keyParamName has the same string value with swagger spec. Dash is allowed in HTTP header name but not in typescript object key name.
Swagger-codegen version
Official CLI Docker container (master branch)
Related issues/PRs
#4008
Suggest a fix/enhancement
Convert the name to TypeScript compatible identifier in the generated code.
Description
The generated authentication configuration file
configuration.tshas compile error if the apikey name contains dash-.https://github.com/wing328/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/TypeScript-Fetch/configuration.mustache#L5
keyParamNamehas the same string value with swagger spec. Dash is allowed in HTTP header name but not in typescript object key name.Swagger-codegen version
Official CLI Docker container (master branch)
Related issues/PRs
#4008
Suggest a fix/enhancement
Convert the name to TypeScript compatible identifier in the generated code.