Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used? Latest Master
- Have you search for related issues/PRs? Yes
- What's the actual output vs expected output? Header is accepted with a capitilsation
- [Optional] Bounty to sponsor the fix (example)
Description
An OAuth 2.0 Access Token is conveyed in a header called Authorization. This can be defined for example like below.
- description: 'An Authorisation Token as per https://tools.ietf.org/html/rfc6750'
explode: false
in: header
name: Authorization
required: true
schema:
type: string
style: simple
Unfortunately the capitalization requirements of the Authorization header isn't being respected by the generator
{
"error": [
{
"path": ".headers.authorization",
"message": "should have required property 'authorization'",
"errorCode": "required.openapi.validation"
}
]
}
So a request with Authorization results in an error being thrown.
openapi-generator version
Latest, it is not a regression.
OpenAPI declaration file content or url
- description: 'An Authorisation Token as per https://tools.ietf.org/html/rfc6750'
explode: false
in: header
name: Authorization
required: true
schema:
type: string
style: simple
Command line used for generation
openapi-generator generate -g nodejs-express-server -i account-info-openapi.yaml
Steps to reproduce
Generate the server, launch server, send a request with an Authorization header with a capital A.