Azure / Azure/azure-sdk-for-java
[design discussion] azure-core support for optional path parameter
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 2.2k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 178
Description
[playground](https://cadlplayground.z22.web.core.windows.net/cadl-azure/?c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7Cgp1c2luZyBIdHRwOwoKQGRvYygiVGVzdCBmb3IgcGF0aCBwYXJhbWV0ZXJzIGNhc2VzLiIpCkBzZXJ2aWNlCm5hbWVzcGFjZSBQyScuUGF0aMRNcm91dGUoIi9vcHRpb25hbHsvxC99IikKb3AgyBUoQMVmxBo%2FOiBzdHJpbmcpOiBOb0NvbnRlbnRSZXNwb25zZTs%3D&e=%40azure-tools%2Ftypespec-client-generator-core&options=%7B%7D)
TCGC output
```
kind: http
path: /optional{name}
uriTemplate: /optional{/name}
verb: get
```
The current RestProxy annotations cannot support such. Whichever template it takes (`/optional{name}` or `/optional/{name}` or even `/optional{/name}`), it likely has to adjust the slash leading `/` based on whether the path parameter is `null` or non-`null`.
Contributor guide
Assessment
This issue has not been assessed yet.