Improvements to ViewSet extra actions by rpkilby · Pull Request #5605 · encode/django-rest-framework (original) (raw)
@auvipy, right now, there's a screenshot in the original comment, which should demonstrate the practical changes to the browsable API. As far as code goes, it's pretty much just:
class MyViewSet(...): @action(methods=['get'], detail=True, name='Custom name' serializer_class=ThingySerializer) def do_a_thing(self, request, pk, *args, **kwargs): """ # Docstrings are now used as descriptions! """