Skip to content

Commit 0fa3f42

Browse files
WilliamPeraltasoyuka
authored andcommitted
fix(metadata): upgrade script keep operation name
origin: api-platform#5105
1 parent 27fcdc6 commit 0fa3f42

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Core/Upgrade/UpgradeApiResourceVisitor.php

+3
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,9 @@ private function legacyOperationsToOperations($legacyOperations, bool $isCollect
443443

444444
$method = $operation['method'] ?? strtoupper($operationName);
445445
unset($operation['method']);
446+
if (!\in_array($operationName, ['get', 'post', 'put', 'patch', 'delete'], true)) {
447+
$operation['name'] = $operationName;
448+
}
446449
$operations[] = $this->createOperation($this->getOperationNamespace($method, $isCollection), $operation);
447450
}
448451

0 commit comments

Comments
 (0)