You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if I understand it correctly, it only affects generated OpenAPI document.
Users could define common response types for entire status code categories (2XX, 3XX, etc) or (optionally) "default".
The responses map type would need to be extended to support int or str (literal).
New constants may be added for the categories in status_codes or elsewhere.
rafalkrupinski
changed the title
Enhancement: Allow status categories in route handlers responses
Enhancement: Allow status code categories in route handlers responses
May 16, 2024
Summary
Allow route handlers to declare responses with status code categories, i.e. "2XX", "3XX", etc.
I'm happy to send PR if the feature is desirable.
Basic Example
Drawbacks and Impact
if I understand it correctly, it only affects generated OpenAPI document.
Users could define common response types for entire status code categories (2XX, 3XX, etc) or (optionally) "default".
The responses map type would need to be extended to support int or str (literal).
New constants may be added for the categories in status_codes or elsewhere.
Unresolved questions
No response
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: