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 #4366

Open
chunyu3 opened this issue Sep 9, 2024 · 0 comments
Open

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

chunyu3 opened this issue Sep 9, 2024 · 0 comments
Assignees
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Comments

@chunyu3
Copy link
Contributor

chunyu3 commented Sep 9, 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 self-assigned this Sep 9, 2024
@chunyu3 chunyu3 added emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp and removed needs-area labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

No branches or pull requests

1 participant