diff --git a/lib/RoadizCoreBundle/src/Api/OpenApi/WebResponseDecorator.php b/lib/RoadizCoreBundle/src/Api/OpenApi/WebResponseDecorator.php index da54e849..21131a1e 100644 --- a/lib/RoadizCoreBundle/src/Api/OpenApi/WebResponseDecorator.php +++ b/lib/RoadizCoreBundle/src/Api/OpenApi/WebResponseDecorator.php @@ -22,6 +22,10 @@ public function __invoke(array $context = []): OpenApi { $openApi = ($this->decorated)($context); $pathItem = $openApi->getPaths()->getPath('/api/web_response_by_path'); + if (null === $pathItem) { + return $openApi; + } + $operation = $pathItem->getGet(); $openApi->getPaths()->addPath('/api/web_response_by_path', $pathItem->withGet(