src/Docgen/Swagger/Swagger.php
/**
     * @param Application $app
     * @param ControllerContainer $controller
     */
@param Application $app
@param ControllerContainer $controller
@param Application $app @param ControllerContainer $controller
public function appendController(Application $app, ControllerContainer $controller)
    {
        $tag = new TagObject();
        $tag->name = $controller->getSummary();
        $tag->description = $controller->getDescription();
        foreach ($controller->getRoutes() as $action => $route) {
            $op = new OperationObject();
            $op->tags = [$controller->getSummary()];
            $op->summary = $route->getSummary();
            $op->description = $route->getDescription();
            $op->parameters = $this->getParamsSchema($app, $controller, $action, $route);
            if($this->hasFileParam($route)){
                $op->consumes = ['multipart/form-data'];
            }
            $op->responses['200'] = $this->getReturnSchema($app, $route->getReturnString()?:'void');
            $op->responses += $this->getExceptionsSchema($app, $controller, $action, $route);
            $uri = $app->getFullUri($route->getUri());
            if (!isset($this->paths[$uri])) {
                $this->paths[$uri] = [];
            }
            $method = strtolower($route->getMethod());
            $this->paths[$uri][$method] = $op;
        }
    }
public function appendController ( Application $ app , ControllerContainer $ controller ) { $ tag = new TagObject ( ) ; $ tag -> name = $ controller -> getSummary ( ) ; $ tag -> description = $ controller -> getDescription ( ) ; foreach ( $ controller -> getRoutes ( ) as $ action => $ route ) { $ op = new OperationObject ( ) ; $ op -> tags = [ $ controller -> getSummary ( ) ] ; $ op -> summary = $ route -> getSummary ( ) ; $ op -> description = $ route -> getDescription ( ) ; $ op -> parameters = $ this -> getParamsSchema ( $ app , $ controller , $ action , $ route ) ; if ( $ this -> hasFileParam ( $ route ) ) { $ op -> consumes = [ 'multipart/form-data' ] ; } $ op -> responses [ '200' ] = $ this -> getReturnSchema ( $ app , $ route -> getReturnString ( ) ? : 'void' ) ; $ op -> responses += $ this -> getExceptionsSchema ( $ app , $ controller , $ action , $ route ) ; $ uri = $ app -> getFullUri ( $ route -> getUri ( ) ) ; if ( ! isset ( $ this -> paths [ $ uri ] ) ) { $ this -> paths [ $ uri ] = [ ] ; } $ method = strtolower ( $ route -> getMethod ( ) ) ; $ this -> paths [ $ uri ] [ $ method ] = $ op ; } }
@param Application $app
 @param ControllerContainer $controller
@param Application $app @param ControllerContainer $controller
//tags