Skip to content

Suggestion: Multiple response support in Schema Generation. #7413

Description

@dhaval-mehta

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions