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
Update response model information for routes #846
Update response model information for routes #846
Conversation
This could be improved further, I think, where the specific errors (e.g., |
Codecov Report
@@ Coverage Diff @@
## master #846 +/- ##
==========================================
- Coverage 92.70% 92.64% -0.06%
==========================================
Files 67 67
Lines 3699 3724 +25
==========================================
+ Hits 3429 3450 +21
- Misses 270 274 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Hereby done. |
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.
Thank you @CasperWA for your hard work
Use a single pydantic model for all routes' `response_model` and add a dictionary of erroneous status codes with the `ErrorResponse` model to all routes' `responses` property, updating the OpenAPI schemas with the correct mapping of response models to status codes.
970b5ac
to
9054d09
Compare
Woot woot. Thank you! Rebased this, keeping a commit for each of us and then force merging it, since the content didn't change since your approval. |
Use a single pydantic model for all routes'
response_model
and add adictionary of erroneous status codes with the
ErrorResponse
model toall routes'
responses
property, updating the OpenAPI schemas with thecorrect mapping of response models to status codes.
Fixes #763