Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] bump a operation paramter to client level #5023

Closed
chunyu3 opened this issue Aug 28, 2024 · 1 comment
Closed

[feature] bump a operation paramter to client level #5023

chunyu3 opened this issue Aug 28, 2024 · 1 comment
Assignees
Labels
DPG/RLC v2.1 Post Gallium work DPG

Comments

@chunyu3
Copy link
Member

chunyu3 commented Aug 28, 2024

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, Azure/typespec-azure#914

.NET codegen will adopt the bump information to generate the client with the bumped parameter, methods will not take this parameter in signature.

@chunyu3 chunyu3 changed the title [feature] adopt @methodLocation to bump a operation paramter to client level [feature] bump a operation paramter to client level Aug 28, 2024
@chunyu3 chunyu3 added DPG DPG/RLC v2.1 Post Gallium work labels Aug 28, 2024
@chunyu3 chunyu3 self-assigned this Sep 9, 2024
@chunyu3
Copy link
Member Author

chunyu3 commented Sep 24, 2024

This is already supported in PR #5063

@chunyu3 chunyu3 closed this as completed Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DPG/RLC v2.1 Post Gallium work DPG
Projects
None yet
Development

No branches or pull requests

1 participant