Support non-standard api version parameter decorated with `@apiVersion`
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 156
Description
Currently some of api version logic is hard-coded with `p.name.toLowerCase() === "apiversion"` this is not true considering in tcgc we have [a `@apiVersion` decorator to support non-standard case](https://github.com/Azure/typespec-azure/issues/1706). We need to consider
- how to support the method-level parameter decorated with api version;
- how to support this parameter with our current client-level option `apiVersion`;
```
@service
@versioned(Versions)
@server(
"{endpoint}/versioning/added/api-version:{version}",
"Testserver endpoint",
{
/**
* Need to be set as 'http://localhost:3000' in client.
*/
endpoint: url,
/**
* Need to be set as 'v1' or 'v2' in client.
*/
@apiVersion
version: Versions,
}
)
namespace Versioning.Added;
```
Contributor guide
Assessment
This issue has not been assessed yet.