Search code examples
swaggerdocumentation-generationapiary

Choose a tools to documents REST API


I actually use Doxygen to document my php REST application and I just discover Apiary & Swagger witch seem to be good tools to document API...I want to know if there is a way to generate documentation automatically using one of this tools (apiary or swagger ) based on the code comments?


Solution

  • Using swagger-php you can generate the documentation automatically from a collection of php scripts documented using annotations.

    Swagger-PHP is decently documented here: http://zircote.com/swagger-php/ A working example can be found on github: https://github.com/zircote/swagger-php/tree/master/Examples/Petstore

    Regarding the generation of the json file containing the documentation check my answer here: https://stackoverflow.com/a/31178997/2853903