You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For brownfield services with non-standard api version patterns we need a way to signal that the parameter or header is specifying the api version for the service in the generated code. We typically default api version parameters to the latest version in generated code, I would like a tcgc decorator that will signal when client libraries should treat a parameter or header like this.
For example, the storage blob service specifies and x-ms-version header on all requests for api versions.
/** Specifies the version of the operation to use for this request. */
@apiVersion
@header("x-ms-version")
version: string,
Check that this issue is about the Azure libraries for typespec. For feature request in the typespec language or core libraries file it in the TypeSpec repo
We should lint against people applying the same decorator to multiple different kinds of api version parameters in a single spec
I think @apiVersion(boolean) is a good name for the decorator
To maintain backcompat and sensible default behavior, parameters with name api-version have the @apiVersion decorator applied by default. If you want a parameter called api-version that isn't an @apiVersion parameter, you have to add @apiVersion(false) api-version: string
Clear and concise description of the problem
For brownfield services with non-standard api version patterns we need a way to signal that the parameter or header is specifying the api version for the service in the generated code. We typically default api version parameters to the latest version in generated code, I would like a tcgc decorator that will signal when client libraries should treat a parameter or header like this.
For example, the storage blob service specifies and
x-ms-version
header on all requests for api versions.cc @iscai-msft
Checklist
The text was updated successfully, but these errors were encountered: