Closed qiaozha closed 1 month ago
currently, tcgc return the endpoint parameter as required, and the endpoint parameter type has one template argument of {endpoint}
which is required but with a client default value of https://api.openai.com/v1
. @iscai-msft do you think we should mark this template argument with optional?
required
or optional
means whether it's required or optional on the server side. While we don't like required params with client default values, I think this is ultimately a required input with a client default value. Thoughts?
I am fine to keep the current way "a required input with a client default value" this also aligns with our current implementation where we ignore the client default value except those defined in the server decorators.
I think we can close this issue.
Describe the bug
in this case, the endpoint is a constant, should we allow customers to modify it, if yes, should we have a required endpoint parameter in the client side ?
Currently, tcgc still returns the required endpoint parameter to us, and because of https://github.com/Azure/typespec-azure/issues/1496#issuecomment-2335108995 we have to set it as a required endpoint parameter. which doesn't quite make sense to me.
Reproduction
n/a
Checklist