-
Notifications
You must be signed in to change notification settings - Fork 37
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
bug(tcgc): getSdkHttpParameter()
doesn't handle default value
#1030
Comments
@iscai-msft i remembered that only when the default value is happened in server endpoint that we will use it as client default value, is that right? if so, it seems we missed this in current code. |
Yep, it's only for api version and endpoint. This information is in |
@iscai-msft for parameters in |
This is a good point, we purposefully don't take |
fixes #1030 --------- Co-authored-by: iscai-msft <[email protected]> Co-authored-by: Chenjie Shi <[email protected]>
Describe the bug
We try to set a endpoint parameter with default value in Azure/cadl-ranch#598
The parameter can be fetched in TCGC, but default value is not parsed. Check the source codes of
getSdkHttpParameter()
, and it seems not handle default value:typespec-azure/packages/typespec-client-generator-core/src/http.ts
Line 294 in 5c10b3e
Reproduction
Just try to parse the definition above.
Checklist
The text was updated successfully, but these errors were encountered: