openapi-backend
openapi-backend copied to clipboard
implement/allow "required" attribute on response headers
Please add support for the "required" attribute in header specifications.
The spec: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#headerObject
says that header fields can contain (with exceptions) the same fields as parameters: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#parameterObject
Which includes "required" which is supposed to default to false.
openapi-backend does not allow the "required" attribute and acts as though it were set to "true".
Changing to the default specified in the spec would break backwards compatibility, but if that's a problem you could at least allow an honor the "required" attribute when it exists.