Closed archerzz closed 2 weeks ago
@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 .templateArguments
though, so I don't think this is an issue. Closing. If it's still an issue can you reopen @archerzz
Describe the bug
We try to set a endpoint parameter with default value in https://github.com/Azure/cadl-ranch/pull/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: https://github.com/Azure/typespec-azure/blob/5c10b3e3524936610283b4044ddd01c73a22827f/packages/typespec-client-generator-core/src/http.ts#L294Reproduction
Just try to parse the definition above.
Checklist