@@ 149-158 (lines=10) @@ | ||
146 | } |
|
147 | } |
|
148 | ||
149 | if ($operations = $resourceMetadata->getItemOperations()) { |
|
150 | foreach ($operations as $operationName => $itemOperation) { |
|
151 | $method = $this->operationMethodResolver->getItemOperationMethod($resourceClass, $operationName); |
|
152 | $swaggerOperation = $this->getSwaggerOperation($resourceClass, $resourceMetadata, $operationName, $itemOperation, $prefixedShortName, false, $definitions, $method); |
|
153 | $operation['item'] = array_merge($operation['item'], $swaggerOperation); |
|
154 | if ($operationName !== strtolower($method)) { |
|
155 | $customOperations['item'][] = $operationName; |
|
156 | } |
|
157 | } |
|
158 | } |
|
159 | ||
160 | if ($operations = $resourceMetadata->getCollectionOperations()) { |
|
161 | foreach ($operations as $operationName => $collectionOperation) { |
|
@@ 160-169 (lines=10) @@ | ||
157 | } |
|
158 | } |
|
159 | ||
160 | if ($operations = $resourceMetadata->getCollectionOperations()) { |
|
161 | foreach ($operations as $operationName => $collectionOperation) { |
|
162 | $method = $this->operationMethodResolver->getCollectionOperationMethod($resourceClass, $operationName); |
|
163 | $swaggerOperation = $this->getSwaggerOperation($resourceClass, $resourceMetadata, $operationName, $collectionOperation, $prefixedShortName, true, $definitions, $method); |
|
164 | $operation['collection'] = array_merge($operation['collection'], $swaggerOperation); |
|
165 | if ($operationName !== strtolower($method)) { |
|
166 | $customOperations['collection'][] = $operationName; |
|
167 | } |
|
168 | } |
|
169 | } |
|
170 | try { |
|
171 | $resourceClassIri = $this->iriConverter->getIriFromResourceClass($resourceClass); |
|
172 | $itemOperationsDocs[$resourceClassIri] = $operation['collection']; |