codeit / swagger-module
Laminas Framework Module for Swagger/OpenAPI resource file generation
4.0.2
2021-01-15 13:59 UTC
Requires
- php: ^7.0
- laminas/laminas-mvc: ^3.0
- laminas/laminas-servicemanager: ^3.1
- zircote/swagger-php: ~3.0
This package is auto-updated.
Last update: 2024-12-20 20:01:32 UTC
README
A Zend Framework module that allows the generation of Swagger compliant resource files and is based on swagger-php.
Installation
The recommended way to install
outeredge/swagger-module
is through
composer:
php composer.phar require outeredge/swagger-module
You can then enable this module in your config/application.config.php
by adding
SwaggerModule
to the modules
key:
// ... 'modules' => array( // ... 'SwaggerModule' ),
Configuration
Copy config/module.swagger.global.php.dist
to your config/autoload folder and modify paths variable
Usage
See swagger-php for library usage information.
$swagger = $this->getServiceLocator()->get('service.swagger'); echo $swagger->getResource('http://org.local/v1');