Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 22: Django Rest Framework autohttp support #23

Open
wants to merge 12 commits into
base: 1.7
Choose a base branch
from

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