v3knet / swagger-module
There is no license information available for the latest version (0.2.0) of this package.
0.2.0
2015-09-27 22:52 UTC
Requires
- php: >=5.5
- bernard/bernard: 1.0.*@dev
- dflydev/doctrine-orm-service-provider: ^2.0.0
- doctrine/cache: ^1.4.1
- doctrine/orm: ^2.5.0
- guzzlehttp/guzzle: ^6.0.2
- jms/serializer: ^1.0
- monolog/monolog: ^1.16.0
- phpdocumentor/reflection-docblock: ^2.0
- psr/log: ^1.0.0
- silex/silex: 2.0.x-dev
- swiftmailer/swiftmailer: ^5.4.1
- symfony/config: ^2.7.0
- symfony/console: ^2.7.0
- symfony/dependency-injection: ^2.7.0
- symfony/form: ^2.7.0
- symfony/security: ^2.7.0
- symfony/security-csrf: ^2.7.0
- symfony/serializer: ^2.7.0
- symfony/translation: ^2.7.0
- symfony/twig-bridge: ^2.7
- symfony/validator: ^2.7.0
- symfony/var-dumper: ^2.7.0
- symfony/yaml: ^2.7.0
- twig/twig: ^1.18
Requires (Dev)
- silex/web-profiler: 2.0.x-dev
- symfony/var-dumper: ^2.7.0
Suggests
- silex/web-profiler: silex/web-profiler 2.0.x-dev
README
This module provides (1) Swagger UI at /swagger and (2) Auto generate the /swagger.json
file.
Example
Define Swagger annotations, the module with add it to swagger.json
response.
namespace my_module\controllers; use vendor_name\project_name\system\controllers\BaseController; use vendor_name\project_name\swagger\annotations as Swagger; class HelloController extends BaseController { /** * @Swagger\Param(name="name", in="path") * @Swagger\Response("Hello") */ public function actionGet($name) { return $this->json(new Hello($name)); } }