Azure / Azure/typespec-azure

[Bug]: Fail to map parameters in parameterized host in tcgc example

Open
#1,419 2 comments 0 reactions 1 assignee Claimed by @tadelesh View on GitHub
bug lib:tcgc
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

### Describe the bug

Fail to map parameters in parameterized hos in tcgc example.

```
@service({title: "ParametrizedHost"})
@useAuth(OAuth2Auth<[MyFlow]>)
@versioned(Versions)
@server(
"{host}.{subdomain}.{sufix}.com",
"Confidential Ledger Service",
{
@path
host?: string = "one",
@path
subdomain?: string = "two",
@path
sufix?: string = "three",
}
)
namespace Azure.Test.ParametrizedHost;
```

And given examples

```
{
"title": "listCollections",
"operationId": "ConfidentialLedger_listCollections",
"parameters": {
"host": "one",
"subdomain": "two",
"sufix": "three",
"apiVersion": "v1"
},
"responses": {
"200": {}
}
}
```

We will not get any example values in paramterized host.

### Reproduction

NA

### Checklist

- [X] Follow our [Code of Conduct](https://github.com/azure/typespec-azure/blob/main/CODE_OF_CONDUCT.md)
- [X] Check that this issue is about the Azure libraries for typespec. For bug in the typespec language or core libraries file it in the [TypeSpec repo](https://github.com/Microsoft/TypeSpec/issues/new/choose)
- [X] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.