library swagger-module
Zend Framework 2 Module for Swagger resource file generation
wfelipew/swagger-module
Zend Framework 2 Module for Swagger resource file generation
- Tuesday, May 17, 2016
- by wfelipew
- Repository
- 1 Watchers
- 0 Stars
- 339 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 12 Forks
- 0 Open issues
- 3 Versions
- 142 % Grown
SwaggerModule
A Zend Framework 2 module that allows the generation of Swagger compliant resource files and is based on swagger-php., (*1)
Requirements
Installation
Installation of SwaggerModule uses composer. For composer documentation, please refer to
getcomposer.org., (*2)
Installation steps
cd my/project/directory
-
create a composer.json
file with following contents:, (*3)
json
{
"require": {
"outeredge/swagger-module": "dev-master"
}
}
, (*4)
- install composer via
curl -s http://getcomposer.org/installer | php
(on windows, download
http://getcomposer.org/installer and execute it with PHP)
- run
php composer.phar install
- copy config/module.swagger.global.php.dist to your config/autoload folder and modify paths variable
-
open my/project/directory/configs/application.config.php
and add the following key to your modules
:, (*5)
php
'SwaggerModule',
, (*6)
Usage
See swagger-php for library usage information., (*7)
$swagger = $this->getServiceLocator()->get('service.swagger');
echo $swagger->getResource('http://org.local/v1');