-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Status Code and Header validation in response. #308
Comments
@efabris currently, only the body is validated in the response. this should be improved. would you be interested in taking a first attempt at a solution? These are some key points to improve: |
@cdimascio absolutely. I will start working on it tonight. |
@cdimascio sorry but after a first look, I no longer had time to continue. The new arrival in the family, my daughter, and my job keep me very busy. I hope to be able to work on it in July. |
@efabris congrats on the new arrival! let me know if you decide to pick it up in july |
I defined a path in my "openapi.yml" with a response defined in this way:
However if i send back an empty response with a different error code, or if I send back a "302 "response with "Location" header set to a non URL string, no errors are triggered also if i set "validateResponses" to "true".
Looking in the repo code I cannot find the validation of status code and header in the response. Is this supported?
If no, i think that this type of validation could be very useful to avoid broking api specification and i think that i can work to add this type of validation, if this issue is approved as an enhancement request.
The text was updated successfully, but these errors were encountered: