open-api
open-api copied to clipboard
Add header validation to openapi-response-validator
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! :)
as long as the OpenAPI spec allows for header validation, go for it!