This is an example application showing how to document a ZF2 RESTful API using Swagger.
- PHP 5.3+
- Web server setup with virtual host to serve project folder
- Composer (manage dependencies)
-
Get composer:
curl -sS https://getcomposer.org/installer | php
-
Install the dependencies:
php composer.phar install
-
Generate the static json swagger documentation using the following command:
php vendor/bin/swagger module/ -o public/docs/
-
Host the generated files where they are accessible by Swagger UI to generate the HTML documentation