Tastypie documentation generation [closed]
Asked Answered
S

3

14

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.

Shirline answered 12/10, 2012 at 3:43 Comment(0)
H
13

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.

Hillhouse answered 28/11, 2012 at 15:39 Comment(1)
tastypie-swagger doesn't support the latest django version. Any ideas on overcoming that hurdle ? ThanksHellenist
C
4

There's also Django Tasty Docs which is part of Tasty Tools

Cabdriver answered 24/1, 2013 at 23:2 Comment(1)
That does not appear to be on the pip index for easy install :(Astatic
B
0

Perhaps I'm completely missing the point of your question but if you are just trying to build the docs that come with the source distribution there is a Makefile in the docs directory that performs the necessary actions. You are required to specify a target output type such as html, json, latex, etc. I keep a local copy of the docs for django, tastypie, and slumber as I use all three in conjunction with each other and I use the option make html frequently.

If I am mistaken about what you are trying to accomplish perhaps we can come to some clarification.

Barde answered 12/10, 2012 at 20:59 Comment(2)
Sorry for not having clarified my question. I can generate the doc with Sphinx the build-in command line, but I can't find the correct place and format to put my comment for each API in my code and generate them into the doc.Shirline
So are you trying to write sphinx documentation for your own API classes that utilize Tastypie?Barde

© 2022 - 2024 — McMap. All rights reserved.