mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +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
|
||||
$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