PHP code example of v3knet / swagger-module
1. Go to this page and download the library: Download v3knet/swagger-module library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
v3knet / swagger-module example snippets
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));
}
}