Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Invalid serializer with detail_route and serializer_class override #466

Closed
Nnonexistent opened this issue Jul 5, 2016 · 1 comment
Closed

Comments

@Nnonexistent
Copy link

For example, for my_custom_action django-rest-swagger will use SomeSerializer instead of MyCustomSerializer.

class MyViewSet(viewsets.GenericViewSet):
    serializer_class = SomeSerializer

    @detail_route(methods=['post', 'delete'], serializer_class=MyCustomSerializer)
    def my_custom_action(self, request, pk):
        ...
@Nnonexistent
Copy link
Author

Thi is fixed in DRF 3.4.2. See encode/django-rest-framework#4359

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

No branches or pull requests

2 participants