Closed chunyu3 closed 1 week ago
Is it possible to move parameters that persist on each operation to the client instead with a decorator of some sort? In EventGrid this shows up in the case of
client() publish(topic_name, events) receive(topic_name, subscription_name, max_events) ack(topic_name, subscription_name, lock_tokens)
to
client(topic_name, subscription_name) publish(events) receive(max_events) ack(lock_tokens)
tcgc will introduce a decorator @clientInitialization to bump a operation parameter to client level, https://github.com/Azure/typespec-azure/issues/914
.NET codegen will adopt the bump information to generate the client with the bumped parameter, methods will not take this parameter in signature.
This is already supported in PR https://github.com/Azure/autorest.csharp/pull/5063
Is it possible to move parameters that persist on each operation to the client instead with a decorator of some sort? In EventGrid this shows up in the case of
client() publish(topic_name, events) receive(topic_name, subscription_name, max_events) ack(topic_name, subscription_name, lock_tokens)
to
client(topic_name, subscription_name) publish(events) receive(max_events) ack(lock_tokens)
tcgc will introduce a decorator @clientInitialization to bump a operation parameter to client level, https://github.com/Azure/typespec-azure/issues/914
.NET codegen will adopt the bump information to generate the client with the bumped parameter, methods will not take this parameter in signature.