Is there an easy way to generate docs for REST api direct from a Symfony project?
Asked
Active
Viewed 1.3k times
6
-
Which version of symfony are you using? – MrGlass Jan 15 '12 at 19:43
-
I dont think there is a way to do it automatically. Most of the stuff should be defined in the routing, but that wouldn't work well for Documentation. – MrGlass Jan 15 '12 at 21:43
-
Seems like a dupe of [this one](http://stackoverflow.com/questions/2756978/how-to-document-a-symfony-based-rest-api-similar-to-enunciates-documentation-c/12609606#12609606) and is related to [this other one](http://stackoverflow.com/questions/5315524/auto-documenting-rest-api-in-php?rq=1) – Patrick Sep 27 '12 at 16:09
1 Answers
10
Sorry for the post digging, but there is a Symfony bundle to help API doc generation, you can check out NelmioApiDocBundle which interconnects well with FOSRestBundle.
The FOSRestBundle documentation provides sample bundles using both bundles to generate REST-ful web services and their documentation.

Hugo Briand
- 1,683
- 20
- 27
-
is there a way to document parameter types in Nelmio (ie form-data vs raw json etc)? see [here](https://github.com/nelmio/NelmioApiDocBundle/issues/403) – abbood Jun 06 '14 at 08:31
-
I'd say you have to use the description for this specific use-case. You can format it in the markdown. – Hugo Briand Jun 06 '14 at 14:45
-