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