Skip to content

Commit

Permalink
fix(metadata): index operations (#6272)
Browse files Browse the repository at this point in the history
  • Loading branch information
GwendolenLynch committed Apr 2, 2024
1 parent d4d2cd4 commit da324e4
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -151,13 +151,13 @@ private function buildResourceOperations(array $attributes, string $resourceClas
[$key, $operation] = $this->getOperationWithDefaults($resource, $operation, true);
$operations[$key] = $operation;
}
$resources[$index] = $resource->withOperations(new Operations($operations));
$resources[$index] = $resource = $resource->withOperations(new Operations($operations));
}

if ($parameters = $resource->getParameters()) {
$operations = [];
foreach ($resource->getOperations() ?? [] as $operation) {
$operations[$operation->getName()] = $this->mergeOperationParameters($operation, $parameters);
foreach ($resource->getOperations() ?? [] as $i => $operation) {
$operations[$i] = $this->mergeOperationParameters($operation, $parameters);
}
$resources[$index] = $resource = $resource->withOperations(new Operations($operations)); // @phpstan-ignore-line
}
Expand Down

0 comments on commit da324e4

Please sign in to comment.