Closed codeclown closed 6 years ago
I've been thinking about validating responses and I pretty much agree with you how it should work.
I'm heavily leaning towards making it easy to validate the responses in tests. Need to test it out and figure out what the API should look like.
I agree that this middleware shouldn't try to modify responses if they don't pass validations. Having an easy way to have a development time and/or opt-in response validation is something that I'm open to adding.
Implemented in v0.2.2
To fully comply with openapi the API should also return responses according to what is defined in the spec.
I can think of two scenarios or use cases for response validation: