/zf2-example-api-swagger

Example ZF2 API using Swagger to document

Primary LanguagePHP

ZF2 API documented by Swagger

This is an example application showing how to document a ZF2 RESTful API using Swagger.

Requirements

Setup

  1. Get composer:

    curl -sS https://getcomposer.org/installer | php
    
  2. Install the dependencies:

    php composer.phar install
    
  3. Generate the static json swagger documentation using the following command:

    php vendor/bin/swagger module/ -o public/docs/
    
  4. Host the generated files where they are accessible by Swagger UI to generate the HTML documentation