phpweb-servicescodeigniterrestswagger-php

Generating REST documentation in a Codeigniter project


I have a REST webservice using Codeigniter and using this lib : https://github.com/chriskacerguis/codeigniter-restserver

I want to generate documentation for this web service. I look to use Swagger UI to generate this documentation. But, I didn't find any documentation how to use Swagger with Codeigniter.

The only project using this two technologies is this one, but don't have a good documentation : https://github.com/panxp/codeigniter-swagger

Can someone paste an example using this two technologies or give me a link to a good documentation ? Of course, if there is another good lib to generate documentation, I'll take it if it's usable with Codeigniter.


Solution

  • In past projects I have used http://apidocjs.com/ which I find pretty easy to use and straightforward to generate from in multiple environments. It took me like 15-20 minutes to get going and looking how I wanted with it having npm already installed. This one doesn't really care about directory or code structure, just your supplied info in the doc blocks.