Open Han-msft opened 1 month ago
When SDK language specified in scope of @client, generated operation group will miss API version. client.tsp
scope
@client
@client({ name: "FaceServiceClient", service: Face, }, "csharp,python") @client({ name: "administration.FaceServiceClient", service: Face, }, "java") namespace FaceServiceClient { @operationGroup @clientName("FaceListClientImpl", "csharp") interface FaceList { ... } ... }
Generated client
internal FaceListClientImpl(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, AzureKeyCredential keyCredential, TokenCredential tokenCredential, Uri endpoint) { ClientDiagnostics = clientDiagnostics; _pipeline = pipeline; _keyCredential = keyCredential; _tokenCredential = tokenCredential; _endpoint = endpoint; }
If there is no scope in parent client, operation group client will have api version on internal constructor. client.tsp
@client({ name: "FaceServiceClient", service: Face, }) namespace FaceServiceClient { @operationGroup interface FaceLists { ... } ... }
internal FaceLists(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, AzureKeyCredential keyCredential, TokenCredential tokenCredential, Uri endpoint, string apiVersion) { ClientDiagnostics = clientDiagnostics; _pipeline = pipeline; _keyCredential = keyCredential; _tokenCredential = tokenCredential; _endpoint = endpoint; _apiVersion = apiVersion; }
The TCGC miss the apiVersion client parameter. File issue https://github.com/Azure/typespec-azure/issues/1499 to track
apiVersion
When SDK language specified in
scope
of@client
, generated operation group will miss API version. client.tspGenerated client
If there is no scope in parent client, operation group client will have api version on internal constructor. client.tsp
Generated client