Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tastypie documentation generation [closed]

I'm trying to use auto-doc tool to generate API doc for Tastypie REST API. I tried Tastytool, but it seems not showing the API's result parameters but the model's columns. Then I tried Sphinx seems more promising since Tastypie supports Sphinx, but I can't find an example to show where & how to put comment for the API inside the code, and generate them into the document.

Anyone can share some info or example about correctly write comment and generate Sphinx doc for Tastypie based API? thanks.

like image 855
Jason Xu Avatar asked Oct 12 '12 03:10

Jason Xu


1 Answers

You might want to take a look at tastypie-swagger, which uses Swagger to generate a /doc/ page for your Tastypie API.

I've had some success with it, after a few minor adaptations (which were necessary due to a tastypie version difference, I suppose).

Edit: The adaptations I found necessary (due to a django version < 1.4 and tastypie version > 0.9.11) are now merged into the mainline branch of tastypie-swagger.

like image 172
tcmb Avatar answered Oct 19 '22 01:10

tcmb