mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-03-12 10:36:09 +03:00
Update the extension
This commit is contained in:
parent
cbd0b453ce
commit
8c71270c66
@ -11,6 +11,7 @@
|
||||
|
||||
namespace EXSyst\Bundle\ApiDocBundle\DependencyInjection;
|
||||
|
||||
use FOS\RestBundle\Controller\Annotations\ParamInterface;
|
||||
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
||||
use phpDocumentor\Reflection\DocBlockFactory;
|
||||
use Swagger\Annotations\Swagger;
|
||||
@ -49,6 +50,9 @@ class EXSystApiDocExtension extends Extension
|
||||
if (class_exists(Swagger::class)) {
|
||||
$loader->load('swagger_php.xml');
|
||||
}
|
||||
if (interface_exists(ParamInterface::class)) {
|
||||
$loader->load('fos_rest.xml');
|
||||
}
|
||||
|
||||
$bundles = $container->getParameter('kernel.bundles');
|
||||
// ApiPlatform support
|
||||
|
@ -32,7 +32,7 @@ class FosRestDescriber implements RouteDescriberInterface
|
||||
|
||||
public function describe(Swagger $api, Route $route, \ReflectionMethod $reflectionMethod)
|
||||
{
|
||||
$annotations = $this->annotationReader->getMethodAnnotations();
|
||||
$annotations = $this->annotationReader->getMethodAnnotations($reflectionMethod);
|
||||
$annotations = array_filter($annotations, function ($value) {
|
||||
return $value instanceof RequestParam || $value instanceof QueryParam;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user