-
Notifications
You must be signed in to change notification settings - Fork 47
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
request.openapi_validated does not break non-opeanpi views #172
Conversation
f354f5b
to
368061c
Compare
Thank you for the quick fix @zupo, this looks good to me. In your comment on the issue you specifically mentioned that this should take care of the 1. issue I raised. From the looks of it should take care of the 2. problem as well, or am I missing something? |
Ah yes, potentially too, but I haven't fully verified that, and wrote a test case. |
368061c
to
08cb63f
Compare
Yep, 2. is fixed too, added a test to make sure it keeps working. |
08cb63f
to
61956e8
Compare
61956e8
to
9aeb507
Compare
Accessing `request.openapi_validated` in a route that has `view_config(openapi=False)` will no longer break the route. Also a fix to make response validation still work even if request validation is turned off. Finally, test_request_validation_disabled was a moot test: it would pass even if validation was enabled, because the request was valid. Made sure both this test and test_response_validation_disabled first verify the request/response is invalid, then disable validation and test again. Refs #165
9aeb507
to
aa924e4
Compare
Unit tests performance report: ✅Everything looks great, carry on!
Footnotes
|
Rebased off of latest master, let's get this one merged, finally. |
Accessing
request.openapi_validated
in a route that hasview_config(openapi=False)
will no longer break the route.Refs #165