kogosoftwarellc / open-api

A Monorepo of various packages to power OpenAPI in node
MIT License
892 stars 235 forks source link

Add header validation to openapi-response-validator #816

Open jakobw opened 2 years ago

jakobw commented 2 years ago

As far as I can tell openapi-response-validator currently only validates the response body, but not the headers.

Validating headers in addition to the response body seems generally useful, and would also make it more consistent with other packages in the monorepo. openapi-request-validator, for example, validates request headers.

Before filing a PR, I thought I'd get some feedback whether this is a desirable feature or whether there are any good reasons why it doesn't validate headers. If there are no objections, I'd be happy to give it a go! :)

jsdevel commented 2 years ago

as long as the OpenAPI spec allows for header validation, go for it!