Skip to content

Commit 74a0866

Browse files
authored
Disable Swagger UI and ReDoc when Swagger is off
1 parent 47c5c6f commit 74a0866

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,8 @@ private function registerSwaggerConfiguration(ContainerBuilder $container, array
587587
}
588588

589589
if (!$config['enable_swagger']) {
590+
$container->setParameter('api_platform.enable_swagger_ui', false);
591+
$container->setParameter('api_platform.enable_re_doc', false);
590592
return;
591593
}
592594

0 commit comments

Comments
 (0)