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

Add decorator to make a parameter to client level #493

Closed
tadelesh opened this issue Mar 22, 2024 · 5 comments
Closed

Add decorator to make a parameter to client level #493

tadelesh opened this issue Mar 22, 2024 · 5 comments
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@tadelesh
Copy link
Member

In swagger, we have x-ms-parameter-location extension to set a parameter to client level. We should also support it in TCGC as a client customization. The main usage scenario is for ARM.

@qiaozha
Copy link
Member

qiaozha commented May 23, 2024

Is there a case that we need a not-subscriptionId parameter to be client level? I wonder if we should limit the scope of this customization to subscripitonId parameter, and ARM only?

I have handled so many cases where service team abused of x-ms-parameter-location and causes problems for us because we honor this value, and java completely ignore x-ms-parameter-location if it's a not-subscriptionId parameter.

@tadelesh
Copy link
Member Author

@qiaozha ref: #914, we got customer ask for data plane for such feature.

@qiaozha
Copy link
Member

qiaozha commented May 29, 2024

Interesting, can we at least set the default value into method level ?

@tadelesh
Copy link
Member Author

Interesting, can we at least set the default value into method level ?

sure.

@lmazuel
Copy link
Member

lmazuel commented Jun 10, 2024

See #914

@lmazuel lmazuel closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

No branches or pull requests

4 participants