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

This package is not auto-updated.

Last update: 2024-11-09 18:48:47 UTC


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));
    }

}