API Documentation - Django REST Framework Docs

700 views
Skip to first unread message

Marc Gibbons

unread,
Mar 11, 2013, 11:32:03 AM3/11/13
to django-res...@googlegroups.com
Hello,

I have developed a tool for which generates an inventory and documentation for your Django REST Framework URL endpoints based on your code and your docstring comments. Link to the repo is below. Contributions are most welcome! 

Many thanks,
Marc

Scott White

unread,
Mar 11, 2013, 2:27:47 PM3/11/13
to django-res...@googlegroups.com
Just installed it, really neat. For the lists, maybe add a link to the resource?

Thanks for sharing this,
Scott

Tom Christie

unread,
Mar 12, 2013, 6:38:03 AM3/12/13
to django-res...@googlegroups.com
I took a look at this a while back, and it really is pretty neat - thanks Marc!

One thing I didn't notice until you posted this tho' was that it provides endpoints that describe the API.
I've probably hinted towards this before, but it looks like you've got something really close to being able to plug into an API documentation auto-generator like swagger...


Swagger requires you to provide certain endpoints describing the API...

* https://github.com/wordnik/swagger-core/wiki/Parameters 

and then generates a snazzy front end description & api explorer for it...


If you've got the time & the inclination it might be worth having a look into.

Just a thought :-p

Also if anyone wants to get together a pull request for a docs page listing all the third party packages for REST framework that'd def be a worthwhile addition to the docs.

(Aside: Apologies marc for being slow at getting around to dealing with your docs PR, will try to find some time to discuss)

Cheers,

  Tom

Marc Gibbons

unread,
Mar 13, 2013, 1:47:39 PM3/13/13
to django-res...@googlegroups.com
Hi Tom,
Yes - Swagger UI is beautiful - and was my inspiration for doing this in the first place! I'm working on producing discoverable endpoints in the format Swagger expects. I am wondering how it handles nested structures (ie. /countries/{id}/cities/{id}/some-endpoint).
Thanks for the feedback!
Marc

Manolo García

unread,
Feb 16, 2014, 1:16:49 PM2/16/14
to django-res...@googlegroups.com, marc.g...@bnotions.com, Federico Sorenson
Hi, I'm currently using django-rest-swagger. Great job by the way ;)
I have a little problem:
* Path Parameters will be shown as soon as you have them in your URL pattern.
* Query Parameters will be shown if you add them in your doc-strings '''param -- param description'''
* But how do show show in Swagger-UI the Post Parameters?

Ravi Bhushan

unread,
May 19, 2018, 5:52:39 AM5/19/18
to Django REST framework
Reply all
Reply to author
Forward
0 new messages