Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Swagger Module for ZF2
branch: master

This branch is 2 commits ahead, 18 commits behind outeredge:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
src/SwaggerModule
.gitignore
README.md
composer.json

README.md

SwaggerModule

A ZF2 module that allows the generation of Swagger compliant resource files and is based on swagger-php.

Requirements

Installation

Installation of SwaggerModule uses composer. For composer documentation, please refer to getcomposer.org.

Installation steps

  1. cd my/project/directory
  2. create a composer.json file with following contents:

     {
         "require": {
             "outeredge/SwaggerModule": "dev-master"
         }
     }
  3. install composer via curl -s http://getcomposer.org/installer | php (on windows, download http://getcomposer.org/installer and execute it with PHP)
  4. run php composer.phar install
  5. copy config/module.swagger.global.php.dist to your config/autoload folder and modify paths variable
  6. open my/project/directory/configs/application.config.php and add the following key to your modules:

     'SwaggerModule',

Usage

See swagger-php for library usage information.

$swagger = $this->getServiceLocator()->get('service.swagger');
echo $swagger->getResource('http://org.local/v1');
Something went wrong with that request. Please try again.