openapi-backend
openapi-backend copied to clipboard
Allow checking for Set-Cookie _response_ headers
I do response validation, and I want to make sure that when my login endpoint is responding with a successful http response code that it's setting at least one cookie.
I put this in my spec:
responses: {
"204": {
description: "success",
headers: {
"Set-Cookie": {
description: "Cookie",
schema: {
type: "string",
minLength: 1,
But validation always fails, despite the chrome inspector telling me that there were two "Set-Cookie" headers.
Here's the error from openid-backend:
{
"keyword": "required",
"dataPath": ".headers",
"schemaPath": "#/properties/headers/required",
"params": {
"missingProperty": "set-cookie"
},
"message": "should have required property 'set-cookie'"
}