You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MaryGao
changed the title
[tcgc]: SDK method parameter is in-consistant with operation parameters with constant path params
[Bug]: TCGC SDK method parameter is in-consistant with operation parameters with autoRouted constant path params
Oct 23, 2024
Describe the bug
SDK method parameter is in-consistant with operation parameters with constant path params.
With below typespec example
SDK method would have
param
parameter as constand type.But relevant operation has 0 parameter. And there is no parameter in path
/foo/bar
.After invetigation it is because the autoRoute feature do the replacement between the param and relevant value if it is string literal - https://github.com/microsoft/typespec/blob/main/packages/rest/src/rest.ts#L138-L143.
I think it's better to align the parameters between method and operation.
Reproduction
NA
Checklist
The text was updated successfully, but these errors were encountered: