Follow up on https://gist.github.com/weidongxu-microsoft/fa420c35cf0611a62a8d155771dd3425
With @armRenameListByOperation
solved, we can put multiple List operation into same Interface
.
TypeSpec dev advises against this approach.
Currently there is an issue on @singleton
resource that blocks this approach.
Solution could be (according to Mark)
- Enhance the utility of
@armProviderNamespace
so that it can be applied to namespace in "cient.tsp". - Add a decorator with similar functionality in TCGC.
Issue aside, there is major disadvantage of re-defining the client hierarchy in "client.tsp".
- "client.tsp" could be large. For example, in this client.tsp for vmware, it took around 150 lines.
- Service need to modify "client.tsp", for every new Interface added.
I take most dev does not want to use it.
Candidate be:
@operationGroupName(target: Interface, name: str, scope: str)
(we may extend the target toOperation
, if we really need this kind of granularity) to override the operation group name for anInterface
.
TCGC would need to take it into account, when handling clients and operation groups.