currently, we have @override decorator in TCGC to redefine an operation in client.tsp, which is useful for option bags, parameter reordering, etc. however it has not been adopted to all language's emitter since they are not using SdkServiceMethod for now. also, the current implementation does not cover the feature like ignore optional param for specific language, handling bubble up client parameter, etc. open this issue to try to get a solid story for method override.
language has own logic to group or order parameters, which is hard for emitters to fully rely on the method parameters signature. then, how could emitter partially use the tcgc service method info? for example, how do emitter know there should be an option bag.
currently, the override method must have same corresponding parameters with original one, but we do receive ask that need to omit optional parameter for specific reason when generate clients.
currently, we have
@override
decorator in TCGC to redefine an operation inclient.tsp
, which is useful for option bags, parameter reordering, etc. however it has not been adopted to all language's emitter since they are not usingSdkServiceMethod
for now. also, the current implementation does not cover the feature like ignore optional param for specific language, handling bubble up client parameter, etc. open this issue to try to get a solid story for method override.