As title says, there is no way to extract any information about header which failed validation while validating response.
For instance, let's say your openapi spec says response header should look like this
responses:
'200':
description: blah blah
headers:
X-Env:
description: Environment enum header
schema:
type: string
enum: [dev, test, prod]
when response has header X-Env: 'wrong' validator produces this king of message does not have a value in the enumeration ["dev", "test", "prod"].
Context DOES NOT HAVE parameter value, it DOES NOT HAVE pointers.instance value. There is no way to which header this message is related to.
Generally it would be nice to have headers validation similar to request headers.
I don't understand why validating request headers produces messages with keys validation.request.parameter.schema.(...) and validating response headers produces messages with keys validation.response.header.schema.(...)
It should both be ...parameter.schema and parameter information in context should be populated with proper parameter names
As title says, there is no way to extract any information about header which failed validation while validating response.
For instance, let's say your openapi spec says response header should look like this
when response has header
X-Env: 'wrong'validator produces this king of messagedoes not have a value in the enumeration ["dev", "test", "prod"].Context DOES NOT HAVE parameter value, it DOES NOT HAVE pointers.instance value. There is no way to which header this message is related to.
Generally it would be nice to have headers validation similar to request headers.
I don't understand why validating request headers produces messages with keys
validation.request.parameter.schema.(...)and validating response headers produces messages with keysvalidation.response.header.schema.(...)It should both be
...parameter.schemaand parameter information in context should be populated with proper parameter names