@@ 19-21 (lines=3) @@ | ||
16 | if ($openApi->getPaths()) { |
|
17 | foreach ($openApi->getPaths() as $path => $pathItem) { |
|
18 | if ($pathItem instanceof PathItem) { |
|
19 | if ($pathItem->getDelete() instanceof OpenApiOperation) { |
|
20 | $operationCollection->addOperation(new Operation($pathItem->getDelete(), $path, Operation::DELETE, $reference . '/' . $path . '/delete', $openApi->getBasePath(), $host)); |
|
21 | } |
|
22 | ||
23 | if ($pathItem->getGet() instanceof OpenApiOperation) { |
|
24 | $operationCollection->addOperation(new Operation($pathItem->getGet(), $path, Operation::GET, $reference . '/' . $path . '/get', $openApi->getBasePath(), $host)); |
|
@@ 23-25 (lines=3) @@ | ||
20 | $operationCollection->addOperation(new Operation($pathItem->getDelete(), $path, Operation::DELETE, $reference . '/' . $path . '/delete', $openApi->getBasePath(), $host)); |
|
21 | } |
|
22 | ||
23 | if ($pathItem->getGet() instanceof OpenApiOperation) { |
|
24 | $operationCollection->addOperation(new Operation($pathItem->getGet(), $path, Operation::GET, $reference . '/' . $path . '/get', $openApi->getBasePath(), $host)); |
|
25 | } |
|
26 | ||
27 | if ($pathItem->getHead() instanceof OpenApiOperation) { |
|
28 | $operationCollection->addOperation(new Operation($pathItem->getHead(), $path, Operation::HEAD, $reference . '/' . $path . '/head', $openApi->getBasePath(), $host)); |
|
@@ 27-29 (lines=3) @@ | ||
24 | $operationCollection->addOperation(new Operation($pathItem->getGet(), $path, Operation::GET, $reference . '/' . $path . '/get', $openApi->getBasePath(), $host)); |
|
25 | } |
|
26 | ||
27 | if ($pathItem->getHead() instanceof OpenApiOperation) { |
|
28 | $operationCollection->addOperation(new Operation($pathItem->getHead(), $path, Operation::HEAD, $reference . '/' . $path . '/head', $openApi->getBasePath(), $host)); |
|
29 | } |
|
30 | ||
31 | if ($pathItem->getOptions() instanceof OpenApiOperation) { |
|
32 | $operationCollection->addOperation(new Operation($pathItem->getOptions(), $path, Operation::OPTIONS, $reference . '/' . $path . '/options', $openApi->getBasePath(), $host)); |
|
@@ 31-33 (lines=3) @@ | ||
28 | $operationCollection->addOperation(new Operation($pathItem->getHead(), $path, Operation::HEAD, $reference . '/' . $path . '/head', $openApi->getBasePath(), $host)); |
|
29 | } |
|
30 | ||
31 | if ($pathItem->getOptions() instanceof OpenApiOperation) { |
|
32 | $operationCollection->addOperation(new Operation($pathItem->getOptions(), $path, Operation::OPTIONS, $reference . '/' . $path . '/options', $openApi->getBasePath(), $host)); |
|
33 | } |
|
34 | ||
35 | if ($pathItem->getPatch() instanceof OpenApiOperation) { |
|
36 | $operationCollection->addOperation(new Operation($pathItem->getPatch(), $path, Operation::PATCH, $reference . '/' . $path . '/patch', $openApi->getBasePath(), $host)); |
|
@@ 35-37 (lines=3) @@ | ||
32 | $operationCollection->addOperation(new Operation($pathItem->getOptions(), $path, Operation::OPTIONS, $reference . '/' . $path . '/options', $openApi->getBasePath(), $host)); |
|
33 | } |
|
34 | ||
35 | if ($pathItem->getPatch() instanceof OpenApiOperation) { |
|
36 | $operationCollection->addOperation(new Operation($pathItem->getPatch(), $path, Operation::PATCH, $reference . '/' . $path . '/patch', $openApi->getBasePath(), $host)); |
|
37 | } |
|
38 | ||
39 | if ($pathItem->getPost() instanceof OpenApiOperation) { |
|
40 | $operationCollection->addOperation(new Operation($pathItem->getPost(), $path, Operation::POST, $reference . '/' . $path . '/post', $openApi->getBasePath(), $host)); |
|
@@ 39-41 (lines=3) @@ | ||
36 | $operationCollection->addOperation(new Operation($pathItem->getPatch(), $path, Operation::PATCH, $reference . '/' . $path . '/patch', $openApi->getBasePath(), $host)); |
|
37 | } |
|
38 | ||
39 | if ($pathItem->getPost() instanceof OpenApiOperation) { |
|
40 | $operationCollection->addOperation(new Operation($pathItem->getPost(), $path, Operation::POST, $reference . '/' . $path . '/post', $openApi->getBasePath(), $host)); |
|
41 | } |
|
42 | ||
43 | if ($pathItem->getPut() instanceof OpenApiOperation) { |
|
44 | $operationCollection->addOperation(new Operation($pathItem->getPut(), $path, Operation::PUT, $reference . '/' . $path . '/put', $openApi->getBasePath(), $host)); |
|
@@ 43-45 (lines=3) @@ | ||
40 | $operationCollection->addOperation(new Operation($pathItem->getPost(), $path, Operation::POST, $reference . '/' . $path . '/post', $openApi->getBasePath(), $host)); |
|
41 | } |
|
42 | ||
43 | if ($pathItem->getPut() instanceof OpenApiOperation) { |
|
44 | $operationCollection->addOperation(new Operation($pathItem->getPut(), $path, Operation::PUT, $reference . '/' . $path . '/put', $openApi->getBasePath(), $host)); |
|
45 | } |
|
46 | } |
|
47 | } |
|
48 | } |