[Bug]: [ARM][SDK] armRenameListByOperation decorator prevent client.tsp re-arrange the operation groups #1052
Closed
4 tasks done
Labels
bug
Something isn't working
lib:azure-resource-manager
Issues for @azure-tools/typespec-azure-core library
Describe the bug
SDK emitter (and TCGC) takes interface (interface with
@client
/@operationGroup
in client.tsp takes precedence) to group the client and operation groups.@armRenameListByOperation
decorator onArmResourceListByParent
operation template would rename the operation to patternlistBy<parent-resource-name>
. This present SDK putting 2 or more ArmResourceListByParent operation (different resource, but same parent resource) to a single operation groups.See https://gist.github.com/weidongxu-microsoft/fa420c35cf0611a62a8d155771dd3425#known-approach-to-group-operations
For brownfield service, SDK would need to keep the operation group structure, to avoid breaking changes.
One solution would be to remove the
@armRenameListByOperation
decorator fromArmResourceListByParent
operation template.But this leaves one question: what can we do to guide (particularly greenfield) service dev on operation name. E.g. it would be welcome that the operation name being consistent for new services, e.g.
listByResourceGroup
orlistByTenant
.If we remove the decorator, breakdown could be
@armRenameListByOperation
(so that operation name would be same, regardless of the existence of@armRenameListByOperation
)@armRenameListByOperation
fromArmResourceListByParent
operation templateReproduction
playground
Checklist
The text was updated successfully, but these errors were encountered: