Skip to content

Commit d7df98f

Browse files
alexndlmsoyuka
authored andcommitted
fix(openapi): fix duplicate get path for webhooks
1 parent abb1fac commit d7df98f

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)