SDK emitter (and TCGC) takes interface (interface with @client/@operationGroup in client.tsp takes precedence) to group the client and operation groups.
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 from ArmResourceListByParent 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 or listByTenant.
If we remove the decorator, breakdown could be
rename all existing operation to the expected name of @armRenameListByOperation (so that operation name would be same, regardless of the existence of @armRenameListByOperation)
remove @armRenameListByOperation from ArmResourceListByParent operation template
[optional] find another way to guide service on the List operation name
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-operationsFor 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