Skip to content

Commit 582076c

Browse files
authored
fix(openapi): duplicate get path for webhooks (#7174)
1 parent 84b9679 commit 582076c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/OpenApi/Factory/OpenApiFactory.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,8 @@ private function collectPaths(ApiResource $resource, ResourceMetadataCollection
251251

252252
[$requestMimeTypes, $responseMimeTypes] = $this->getMimeTypes($operation);
253253

254-
if ($path) {
255-
$pathItem = $paths->getPath($path) ?: new PathItem();
256-
} elseif (!$pathItem) {
257-
$pathItem = new PathItem();
254+
if (null === $pathItem) {
255+
$pathItem = $paths->getPath($path) ?? new PathItem();
258256
}
259257

260258
$forceSchemaCollection = $operation instanceof CollectionOperationInterface && 'GET' === $method;

0 commit comments

Comments
 (0)