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.
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
AutoSchemaclass. If we can provide an easy way to integrate multiple success responses, it will be a great addition to DRF.