httpdomain icon indicating copy to clipboard operation
httpdomain copied to clipboard

Issue 22: Django Rest Framework autohttp support

Open Nekmo opened this issue 6 years ago • 2 comments

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.

Nekmo avatar May 11 '19 15:05 Nekmo

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.

ashb avatar Sep 02 '21 11:09 ashb

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

moorchegue avatar Feb 09 '23 08:02 moorchegue