2

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?

Betty
  • 67
  • 1
  • 8
  • I've answered that on https://stackoverflow.com/questions/22534792/good-rest-code-generation-and-documentation-tool/22535376#22535376 — RAML is similar to Swagger in this aspect. – Almad Jul 02 '15 at 09:48

1 Answers1

2

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

Community
  • 1
  • 1
Mark
  • 5,437
  • 2
  • 19
  • 29
  • thank you so much @Mark I will see the examples in your unswer. – Betty Jul 02 '15 at 22:17
  • What do you think about apiDoc ? – Betty Jul 02 '15 at 23:12
  • 1
    Hi @Betty, in the end `swagger`, `raml`, `blueprint` and `apiDoc` serve for defining API. In terms of tool coverage and specific language integrations I think `swagger` is the best. It has annotation support for the major languages (php, java, js, etc), code generators (ie. swagger-codegen), doc generators (ie. swagger-php) and visualizing tools (ie. swagger-ui). Moreover is community driven and its development is quite aggressive on Github. – Mark Jul 03 '15 at 07:48
  • Ok thank you so much @Mark ..but I haven't find enough documentation which expalin steps how can I implement this tools because even I have seen the examples in github I can't unfortunatly use it into my project.. Can you help me please ? – Betty Jul 03 '15 at 08:01