mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
enable ApiDocExtractor overriding
This commit is contained in:
parent
b494d8e1ab
commit
aada3151aa
@ -122,7 +122,7 @@ class ApiDocExtractor
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($method = $this->getReflectionMethod($route->getDefault('_controller'))) {
|
if ($method = $this->getReflectionMethod($route->getDefault('_controller'))) {
|
||||||
$annotation = $this->reader->getMethodAnnotation($method, self::ANNOTATION_CLASS);
|
$annotation = $this->reader->getMethodAnnotation($method, static::ANNOTATION_CLASS);
|
||||||
if (
|
if (
|
||||||
$annotation && !in_array($annotation->getSection(), $excludeSections) &&
|
$annotation && !in_array($annotation->getSection(), $excludeSections) &&
|
||||||
(in_array($view, $annotation->getViews()) || (0 === count($annotation->getViews()) && $view === ApiDoc::DEFAULT_VIEW))
|
(in_array($view, $annotation->getViews()) || (0 === count($annotation->getViews()) && $view === ApiDoc::DEFAULT_VIEW))
|
||||||
@ -255,7 +255,7 @@ class ApiDocExtractor
|
|||||||
public function get($controller, $route)
|
public function get($controller, $route)
|
||||||
{
|
{
|
||||||
if ($method = $this->getReflectionMethod($controller)) {
|
if ($method = $this->getReflectionMethod($controller)) {
|
||||||
if ($annotation = $this->reader->getMethodAnnotation($method, self::ANNOTATION_CLASS)) {
|
if ($annotation = $this->reader->getMethodAnnotation($method, static::ANNOTATION_CLASS)) {
|
||||||
if ($route = $this->router->getRouteCollection()->get($route)) {
|
if ($route = $this->router->getRouteCollection()->get($route)) {
|
||||||
return $this->extractData($annotation, $route, $method);
|
return $this->extractData($annotation, $route, $method);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user