typespec icon indicating copy to clipboard operation
typespec copied to clipboard

[Bug]: could not use uri template in server endpoint

Open tadelesh opened this issue 1 year ago • 3 comments

Describe the bug

not able to allow reserved encoding for param in endpoint

Reproduction

playground

Checklist

tadelesh avatar Aug 13 '24 09:08 tadelesh

for server we had established that using url was ok to not encode but I do agree that we need to find a way to migrate the server url to uriTemplate.

Do you have use case apart from teh base url?

timotheeguerin avatar Aug 13 '24 15:08 timotheeguerin

the other thing that uriTemplate can help a lot is providing a template on how to build url for the service. kinda related to @server but just a more flexible function like

"{+endpoint}/v2/{+route}?alwayshere=true"

timotheeguerin avatar Aug 13 '24 16:08 timotheeguerin

for server we had established that using url was ok to not encode but I do agree that we need to find a way to migrate the server url to uriTemplate.

Do you have use case apart from teh base url?

i don't have a real case, just find the problem when add uri template support in tcgc. i believe it's better to keep consistent, but not so high priority.

tadelesh avatar Aug 14 '24 03:08 tadelesh