0

I Disabled a method in a ViewSet (Retrive and List), but swagger (Open API) keep showing it in the documentation.

I tried this, based on this question:

def list(self, request):
    response = {'message': 'List function is not offered in this path.'}
    return Response(response, status=status.HTTP_403_FORBIDDEN)

But its still present the endpoint.

0 Answers0