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