Skip to content

Conversation

@Nekmo
Copy link

@Nekmo Nekmo commented May 11, 2019

To use it add to conf.py:

directory = os.path.dirname(os.path.abspath(__file__))
# Add project root path to sys.path
sys.path.append(os.path.abspath(os.path.join(directory, '../')))

os.environ['DJANGO_SETTINGS_MODULE'] = 'my_project.settings'
django.setup()

This requirement is the same as to use autodoc, so if autodoc is probably already configured.

Add the extension:

extensions = [
    'sphinx.ext.autodoc',
    ...
    'sphinxcontrib.autohttp.drf',
]

And use it:

.. autodrf:: 

Features:

  • List routes with their description and action method (post, get...).
  • List the query params, urls params and form/json params with their description. Includes types.

More features could be added in the future.

@ashb
Copy link
Collaborator

ashb commented Sep 2, 2021

Hi @Nekmo, I've just taken over working on this project, and noticed your (now very old PR).

Do you still want this? If so could you please add some unit tests?

If I don't hear back from you in two weeks I'll close this PR.

@moorchegue
Copy link

This looks promising. Any chance of being finished/merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants