I have a Django website and I created a REST api. In the view functions I have documentation on the REST urls and I want to generate API docs for the REST urls. The view functions look like this:
def genres(request):
"""
Url: /api/genres/
Parameters: None
Returns: list of genres { { "id":1, "name":"action" }, {...} }
"""
pass
But when I run sphinx on myproject.api.views I get html docs for calling the api in python. Is there a way to configure sphinx to document it like a REST api?
Or am I better off writing a script to generate my docs from the docstrings myself?