-
Notifications
You must be signed in to change notification settings - Fork 418
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
feat(event_handler): add route-level custom response validation in OpenAPI utility #6341
feat(event_handler): add route-level custom response validation in OpenAPI utility #6341
Conversation
… error status code.
…lidation_error_http_code
n.b. |
Try to run |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6341 +/- ##
========================================
Coverage 96.33% 96.33%
========================================
Files 243 243
Lines 11763 11797 +34
Branches 871 878 +7
========================================
+ Hits 11332 11365 +33
Misses 337 337
- Partials 94 95 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Looking at this now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @amin-farjadi! Super thanks for this another PR. It took me a few more days than I expected to review this PR because I had some internal priorities.
Overall this PR is pretty good, but there is 1 critical item that needs to be fixed before I can do a final review and merge.
Please let me know if you need any help.
@leandrodamascena I think it's all done. appreciate a review. p.s. found a lil bug whilst testing the openapi schema — #6435 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @amin-farjadi! Thanks a lot for another super nice PR and addressing all the comments!
APPROVED!!
Issue number: #6245
Summary
Adds custom http code for when response validation fails per route.
Changes
custom_response_validation_http_code
argument forRoute
route
method inRouter
andAPIGatewayResolver
_validate_route_response_validation_error_http_code
method toAPIGatewayResolver
has_route_custom_response_validation
argument to the_serialize_response
method in OpenAPIValidationMiddlewareresponse_validation_error_response_definition
to open api typesUser experience
After the merge of #6189, users could add custom response validation error http code at the app level
Now, users can customise the response validation http code at route level as well as at app level
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.