@@ 174-184 (lines=11) @@ | ||
171 | $resourceClassIri = $this->iriConverter->getIriFromResourceClass($resourceClass); |
|
172 | $itemOperationsDocs[$resourceClassIri] = $operation['collection']; |
|
173 | ||
174 | if (!empty($customOperations['collection'])) { |
|
175 | foreach ($customOperations['collection'] as $customOperation) { |
|
176 | $path = $resourceMetadata->getCollectionOperationAttribute($customOperation, 'path'); |
|
177 | if (null !== $path) { |
|
178 | $method = $this->operationMethodResolver->getCollectionOperationMethod($resourceClass, $customOperation); |
|
179 | $customSwaggerOperation = $this->getSwaggerOperation($resourceClass, $resourceMetadata, $customOperation, [$method], $prefixedShortName, true, $definitions, $method); |
|
180 | ||
181 | $itemOperationsDocs[$path] = $customSwaggerOperation; |
|
182 | } |
|
183 | } |
|
184 | } |
|
185 | ||
186 | ||
187 | $resourceClassIri .= '/{id}'; |
|
@@ 191-201 (lines=11) @@ | ||
188 | ||
189 | $itemOperationsDocs[$resourceClassIri] = $operation['item']; |
|
190 | ||
191 | if (!empty($customOperations['item'])) { |
|
192 | foreach ($customOperations['item'] as $customOperation) { |
|
193 | $path = $resourceMetadata->getItemOperationAttribute($customOperation, 'path'); |
|
194 | if (null !== $path) { |
|
195 | $method = $this->operationMethodResolver->getItemOperationMethod($resourceClass, $customOperation); |
|
196 | $customSwaggerOperation = $this->getSwaggerOperation($resourceClass, $resourceMetadata, $customOperation, [$method], $prefixedShortName, true, $definitions, $method); |
|
197 | ||
198 | $itemOperationsDocs[$path] = $customSwaggerOperation; |
|
199 | } |
|
200 | } |
|
201 | } |
|
202 | } catch (InvalidArgumentException $e) { |
|
203 | } |
|
204 |