microsoft / typespec

https://typespec.io/
MIT License
4.05k stars 187 forks source link

explore compiler defaulting host parameters from literals to strings with the literal value as a default #3821

Closed iscai-msft closed 3 weeks ago

iscai-msft commented 1 month ago

Clear and concise description of the problem

There's continued discussion over whether host parameters should be generated as literal values, when guidelines say that host is something that can always be overridden. We don't want to make users explicitly define host as a value with a default every time, but emitters would like the . TCGC is going to special-case host params to be strings with default values (issue here), this issue is to eventually explore having the compiler do this instead of tcgc, which would be preferable if this is something that we want to provide to all emitters and emitter authors.

Checklist

timotheeguerin commented 1 month ago

Needs more info on what do you actually expect. And in scenarios like that what would you even want Playground

weidongxu-microsoft commented 1 month ago

I assume the "guidelines" here is Azure guideline, i.e. flavor=azure.

Would TCGC behave differently, if e.g flavor=generic ?

timotheeguerin commented 1 month ago

I think if anything people 3rd party are way more likely to want to always have the baseUrl overridable.

microsoft-github-policy-service[bot] commented 3 weeks ago

Hi @iscai-msft. Since there hasn't been recent engagement, we're going to close this out. Please feel free to reopen if you have any further questions or concerns.