Skip to content

OpenAPI: Allow separate serializers for request/response/components #7425

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

Closed
wants to merge 1 commit into from

Conversation

akx
Copy link
Contributor

@akx akx commented Jul 23, 2020

Description

On occasion (or often, I guess), the input and output formats (=serializers) for a view might be different. This PR makes it easier for an OpenAPI schema subclass to describe that case by having three (body, response, and for symmetry components) trampoline functions that can be overridden.

This will likely also make it easier to infer serializers for auxiliary @actions in viewsets.

@carltongibson
Copy link
Collaborator

Duplicate of #7424 — So similar, let's keep discussion there. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants