mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-10 03:29:25 +03:00
Remove SwaggerUI controller when TwigBundle is not registered
This commit is contained in:
parent
2b95b1bd0f
commit
44422d86a0
@ -88,6 +88,9 @@ final class NelmioApiDocExtension extends Extension implements PrependExtensionI
|
|||||||
|
|
||||||
// ApiPlatform support
|
// ApiPlatform support
|
||||||
$bundles = $container->getParameter('kernel.bundles');
|
$bundles = $container->getParameter('kernel.bundles');
|
||||||
|
if (!isset($bundles['TwigBundle'])) {
|
||||||
|
$container->removeDefinition('nelmio_api_doc.controller.swagger_ui');
|
||||||
|
}
|
||||||
if (isset($bundles['ApiPlatformBundle']) && class_exists('ApiPlatform\Core\Documentation\Documentation')) {
|
if (isset($bundles['ApiPlatformBundle']) && class_exists('ApiPlatform\Core\Documentation\Documentation')) {
|
||||||
$loader->load('api_platform.xml');
|
$loader->load('api_platform.xml');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user