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
Description:
When generating a client that targets a specific API version, the generated createClient function does not respect the specified api-version flag in tspconfig.yaml. Although models and operations for the specific version are generated correctly, createClient defaults to the latest version instead of the specified one.
Relevant Details:
TCGC was updated to support targeting specific API versions through the api-version flag in tspconfig.yaml, as introduced by this change.
The TypeScript emitter is already utilizing TCGC with this feature support.
The issue is specifically observed in the generated createClient function which continues to use the default (latest) API version.
Suspected Culprit:
The issue might be stemming from how the API version is handled or defaulted in the createClient function within the TypeScript Emitter. Specifically, the logic in this line of code might be ignoring the specified API version.
Steps to Reproduce:
Configure tspconfig.yaml with a specific api-version.
Generate a client using the Typescript Emitter.
Observe that the generated client's createClient function defaults to the latest API version instead of using the specified version.
Expected Behavior:
The createClient function should respect the API version specified in tspconfig.yaml and use it instead of defaulting to the latest version.
Actual Behavior:
The createClient function ignores the specified API version and defaults to the latest version.
Screenshots/Logs:
Environment:
Typescript Emitter version: 0.28.0
Typespec Compiler version: 0.55.0
The text was updated successfully, but these errors were encountered:
Description:
When generating a client that targets a specific API version, the generated
createClient
function does not respect the specifiedapi-version
flag intspconfig.yaml
. Although models and operations for the specific version are generated correctly,createClient
defaults to the latest version instead of the specified one.Relevant Details:
api-version
flag intspconfig.yaml
, as introduced by this change.createClient
function which continues to use the default (latest) API version.Suspected Culprit:
createClient
function within the TypeScript Emitter. Specifically, the logic in this line of code might be ignoring the specified API version.Steps to Reproduce:
tspconfig.yaml
with a specificapi-version
.createClient
function defaults to the latest API version instead of using the specified version.Expected Behavior:
The
createClient
function should respect the API version specified intspconfig.yaml
and use it instead of defaulting to the latest version.Actual Behavior:
The
createClient
function ignores the specified API version and defaults to the latest version.Screenshots/Logs:
Environment:
The text was updated successfully, but these errors were encountered: