diff --git a/tests/Laravel/CachingTest.php b/tests/Laravel/CachingTest.php index dc4e788..883071f 100644 --- a/tests/Laravel/CachingTest.php +++ b/tests/Laravel/CachingTest.php @@ -31,6 +31,7 @@ public static function reloadTests(): iterable public function testReload(?CacheInterface $cache, $reload, $openapisCached) { $options = [ + OpenApiRouter::OPTION_OA_INFO_INJECT => true, OpenApiRouter::OPTION_RELOAD => $reload, OpenApiRouter::OPTION_CACHE => $cache, ]; diff --git a/tests/Laravel/CallsApplicationTrait.php b/tests/Laravel/CallsApplicationTrait.php index 5f3c55f..94780a7 100644 --- a/tests/Laravel/CallsApplicationTrait.php +++ b/tests/Laravel/CallsApplicationTrait.php @@ -37,9 +37,12 @@ public function createApplication() ]); Facade::setFacadeApplication($app); - (new OpenApiRouter($this->getFixtureFinder(), new LaravelRoutingAdapter($app))) + $options = [ + OpenApiRouter::OPTION_OA_INFO_INJECT => true, + ]; + (new OpenApiRouter($this->getFixtureFinder(), new LaravelRoutingAdapter($app), $options)) ->registerRoutes(); - $openapi = (new OpenApiRouter($this->getFixtureFinder(), new LaravelRoutingAdapter($app))) + $openapi = (new OpenApiRouter($this->getFixtureFinder(), new LaravelRoutingAdapter($app), $options)) ->scan(); file_put_contents(__DIR__ . '/openapi.yaml', $openapi->toYaml()); diff --git a/tests/Slim4/CallsControllerTrait.php b/tests/Slim4/CallsControllerTrait.php index 06e1e03..a84c725 100644 --- a/tests/Slim4/CallsControllerTrait.php +++ b/tests/Slim4/CallsControllerTrait.php @@ -33,9 +33,12 @@ protected function getApp(): App { $app = AppFactory::create(); - (new OpenApiRouter($this->getFixtureFinder(), new SlimRoutingAdapter($app))) + $options = [ + OpenApiRouter::OPTION_OA_INFO_INJECT => true, + ]; + (new OpenApiRouter($this->getFixtureFinder(), new SlimRoutingAdapter($app), $options)) ->registerRoutes(); - $openapi = (new OpenApiRouter($this->getFixtureFinder(), new SlimRoutingAdapter($app))) + $openapi = (new OpenApiRouter($this->getFixtureFinder(), new SlimRoutingAdapter($app), $options)) ->scan(); file_put_contents(__DIR__ . '/openapi.yaml', $openapi->toYaml());