Skip to content

Instantly share code, notes, and snippets.

@KimSoungRyoul
Created April 18, 2021 17:06
Show Gist options
  • Save KimSoungRyoul/268b92490c473457e61ff8ac4bce2f63 to your computer and use it in GitHub Desktop.
Save KimSoungRyoul/268b92490c473457e61ff8ac4bce2f63 to your computer and use it in GitHub Desktop.
@extend_schema(
request=PolymorphicProxySerializer(
component_name='Pet',
serializers=[
CatSerializer, DogSerializer,
],
resource_type_field_name='pet_type',
)
)
def create(self, request, *args, **kwargs):
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment