You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our openapi schema had for a certain endpoint defined expected responses for 201, 400, 401, and 500 status codes.
The 201 was actually a copy paste typo, and we were returning a 200.
Because the schema for 200 was undefined, no validation occurred.
Strict validation and Response validation were both set to true.
Expected behaviour
An undocumented status code should result in validation failure and a 500
Actual behaviour
An undocumented status code skips response validation
Steps to reproduce
Create a connexion flask app configured with both strict_validation and validate_responses set to True, and also using an openapi.yaml schema
inside the schema, define a basic endpoint path with a acceptable responses set to 201 and create a basic schema to validate
inside the flask app, have the endpoint return a response body that breaks the schema, but with a 200 status code
The text was updated successfully, but these errors were encountered:
Description
Our openapi schema had for a certain endpoint defined expected responses for 201, 400, 401, and 500 status codes.
The 201 was actually a copy paste typo, and we were returning a 200.
Because the schema for 200 was undefined, no validation occurred.
Strict validation and Response validation were both set to true.
Expected behaviour
An undocumented status code should result in validation failure and a 500
Actual behaviour
An undocumented status code skips response validation
Steps to reproduce
strict_validation
andvalidate_responses
set toTrue
, and also using an openapi.yaml schemaThe text was updated successfully, but these errors were encountered: