mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +03:00
Merge pull request #1074 from nelmio/twig
Remove SwaggerUI controller when TwigBundle is not registered
This commit is contained in:
commit
e78ee9bda5
@ -88,6 +88,9 @@ final class NelmioApiDocExtension extends Extension implements PrependExtensionI
|
||||
|
||||
// ApiPlatform support
|
||||
$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')) {
|
||||
$loader->load('api_platform.xml');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user