Skip to content

Commit

Permalink
fix: Allow OpenApi decoration with no web_response_by_path path
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Apr 10, 2024
1 parent cfd0c53 commit c74dc6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/RoadizCoreBundle/src/Api/OpenApi/WebResponseDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c74dc6f

Please sign in to comment.