Forum Discussion

JeetSureja99's avatar
2 years ago

How to generate api document for custom name methods, django rest framework, yasg?


class BaseClass(views.APIView):
    def get(self):
        return self.processGet()

    def processGet(self):

class CustomClass(BaseClass):
     def processGet(self):
        print("This is custom GET method")

I want to have a API documentation for processGet method of CustomClass only. How can I achieve that.

I have tried with swagger_auto_schema decorator to specify method="get" but it says we can not specify method to non-ApiView classes. 


No RepliesBe the first to reply