Suggestion: Multiple response support in Schema Generation. #7821
Unanswered
dhaval-mehta
asked this question in
Ideas & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
By default, the schema generator takes serializer and generate a schema from it.
I believe each API may have multiple responses. In general, for each API, there is one success response, and many error responses generated by any subclass of
APIException
. For anyone who is consuming API, an error response is as important as a success response.My suggestion is If we can add those error responses in the schema generation it will be a great addition.
Optional:
Also, an API may have multiple success responses. Oneway to add them to the schema is, override methods of
AutoSchema
class. If we can provide an easy way to integrate multiple success responses, it will be a great addition to DRF.Beta Was this translation helpful? Give feedback.
All reactions