list_route action does not show in Django REST framework docs

Viewed 538

I have an action as shown below:

@list_route(url_path='posts/search')
    def search_posts(self, request):
        <some action>

Now, I am using DRF's Built-in API documentation to generate my API docs. But the above action does not show up. However, if I remove the url_path from @list_route then it shows up. Seems like the url_path has to match with the action name for the documentation generator to include it in the API docs. How can I fix this? I do not want to change the url_path.

0 Answers
Related