Repository: Azure/azure-rest-api-specs
Pull request #33687: [hybridconnectivity] Fix. net SDK renaming issue
Author: login: melina5656
Labels: name: TypeSpec
description: Authored with TypeSpec
name: PipelineBotTrigger
Created: 2025-04-03T01:53:40Z | Merged: 2025-04-03T04:41:45Z

Fix the issue of renaming after TSP generates. NET SDK.


Diff:
diff --git a/specification/hybridconnectivity/HybridConnectivity.Management/PublicCloud.tsp b/specification/hybridconnectivity/HybridConnectivity.Management/PublicCloud.tsp
index 5d01b6bf4ca2..83f2975fbf36 100644
--- a/specification/hybridconnectivity/HybridConnectivity.Management/PublicCloud.tsp
+++ b/specification/hybridconnectivity/HybridConnectivity.Management/PublicCloud.tsp
@@ -357,9 +357,15 @@ interface GenerateAwsTemplate {
     @doc("ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template.")
     @body
     generateAwsTemplateRequest: GenerateAwsTemplateRequest,
-  ): Azure.ResourceManager.ArmResponse<{}> | ErrorResponse;
+  ): Azure.ResourceManager.ArmResponse<GenerateAwsTemplateResponse> | ErrorResponse;
 }
 
+/**
+ * The HybridConnectivity post operation response
+ */
+#suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model"
+model GenerateAwsTemplateResponse {}
+
 @armResourceOperations
 interface PublicCloudConnectors {
   get is ArmResourceRead<PublicCloudConnector>;
diff --git a/specification/hybridconnectivity/HybridConnectivity.Management/client.tsp b/specification/hybridconnectivity/HybridConnectivity.Management/client.tsp
index 80af68c70001..6879f6fe1305 100644
--- a/specification/hybridconnectivity/HybridConnectivity.Management/client.tsp
+++ b/specification/hybridconnectivity/HybridConnectivity.Management/client.tsp
@@ -87,3 +87,67 @@ namespace Microsoft.HybridConnectivity;
 @@clientName(Microsoft.HybridConnectivity, "HybridConnectivityMgmt", "python");
 @@alternateType(AADProfileProperties.serverId, uuid, "csharp");
 @@alternateType(AADProfileProperties.tenantId, uuid, "csharp");
+@@clientName(InventoryResource, "PublicCloudInventory", "csharp");
+@@clientName(SolutionConfiguration,
+  "PublicCloudConnectorSolutionConfiguration",
+  "csharp"
+);
+@@clientName(SolutionTypeResource,
+  "PublicCloudConnectorSolutionType",
+  "csharp"
+);
+@@clientName(HostType, "PublicCloudHostType", "csharp");
+@@alternateType(GenerateAwsTemplateRequest.connectorId,
+  armResourceIdentifier,
+  "csharp"
+);
+@@clientName(HostType.AWS, "Aws", "csharp");
+@@clientName(InventoryProperties, "PublicCloudInventoryProperties", "csharp");
+@@alternateType(InventoryProperties.azureResourceId,
+  armResourceIdentifier,
+  "csharp"
+);
+@@clientName(SolutionConfigurationProperties,
+  "PublicCloudConnectorSolutionConfigurationProperties",
+  "csharp"
+);
+@@clientName(SolutionConfigurationProperties.lastSyncTime,
+  "LastSyncedOn",
+  "csharp"
+);
+@@clientName(SolutionConfigurationStatus,
+  "PublicCloudConnectorSolutionConfigurationStatus",
+  "csharp"
+);
+@@clientName(SolutionSettings,
+  "PublicCloudConnectorSolutionSettings",
+  "csharp"
+);
+@@clientName(SolutionTypeSettings,
+  "PublicCloudConnectorSolutionTypeSettings",
+  "csharp"
+);
+@@clientName(SolutionTypeProperties,
+  "PublicCloudConnectorSolutionTypeProperties",
+  "csharp"
+);
+@@clientName(SolutionTypeSettingsProperties,
+  "PublicCloudConnectorSolutionTypeSettingsProperties",
+  "csharp"
+);
+@@clientName(Azure.ResourceManager.Foundations.OperationStatusResult,
+  "HybridConnectivityOperationStatus",
+  "csharp"
+);
+@@alternateType(Azure.ResourceManager.Foundations.OperationStatusResult.resourceId,
+  armResourceIdentifier,
+  "csharp"
+);
+@@clientName(Azure.ResourceManager.ResourceProvisioningState,
+  "PublicCloudResourceProvisioningState",
+  "csharp"
+);
+@@clientName(GenerateAwsTemplateResponse,
+  "GenerateAwsTemplateResult",
+  "csharp"
+);
diff --git a/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/hybridconnectivity.json b/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/hybridconnectivity.json
index ac6dbf0af830..eb43d8268f0e 100644
--- a/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/hybridconnectivity.json
+++ b/specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/hybridconnectivity.json
@@ -1216,7 +1216,7 @@
           "200": {
             "description": "Azure operation completed successfully.",
             "schema": {
-              "type": "object"
+              "$ref": "#/definitions/GenerateAwsTemplateResponse"
             }
           },
           "default": {
@@ -1934,6 +1934,10 @@
         "connectorId"
       ]
     },
+    "GenerateAwsTemplateResponse": {
+      "type": "object",
+      "description": "The HybridConnectivity post operation response"
+    },
     "HostType": {
       "type": "string",
       "description": "Enum of host cloud the public cloud connector is referencing.",


Reviews:
user: login: ArthurMa1978
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-03T02:16:11Z
user: login: ArthurMa1978
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-03T02:20:09Z
user: login: ArthurMa1978
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-03T03:26:25Z
user: login: ArthurMa1978
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-03T03:27:26Z
user: login: ArthurMa1978
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-03T04:41:33Z

Review comments:
diff_hunk: @@ -357,9 +357,15 @@ interface GenerateAwsTemplate {
     @doc("ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template.")
     @body
     generateAwsTemplateRequest: GenerateAwsTemplateRequest,
-  ): Azure.ResourceManager.ArmResponse<{}> | ErrorResponse;
+  ): Azure.ResourceManager.ArmResponse<HybridConnectivityPostOperationResult> | ErrorResponse;
 }
 
+/**
+ * The HybridConnectivity post operation response
+ */
+#suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model"
+model HybridConnectivityPostOperationResult {}
path: specification/hybridconnectivity/HybridConnectivity.Management/PublicCloud.tsp
user: login: ArthurMa1978
body: The name shoulde be `GenerateAwsTemplateReponse`, and rename to `GenerateAwsTemplateResult`.
created_at: 2025-04-03T02:16:11Z
author_association: MEMBER
diff_hunk: @@ -376,10 +382,13 @@ interface PublicCloudConnectors {
   testPermissions is ArmResourceActionAsync<
     PublicCloudConnector,
     void,
-    Azure.ResourceManager.Foundations.OperationStatusResult
+    HybridConnectivityOperationStatus
path: specification/hybridconnectivity/HybridConnectivity.Management/PublicCloud.tsp
user: login: ArthurMa1978
body: Looks like there is no impact to generated code / swagger spec, revert this change if yes. 
created_at: 2025-04-03T02:20:09Z
author_association: MEMBER
diff_hunk: @@ -357,9 +357,15 @@ interface GenerateAwsTemplate {
     @doc("ConnectorId and SolutionTypes and their properties to Generate AWS CFT Template.")
     @body
     generateAwsTemplateRequest: GenerateAwsTemplateRequest,
-  ): Azure.ResourceManager.ArmResponse<{}> | ErrorResponse;
+  ): Azure.ResourceManager.ArmResponse<GenerateAwsTemplateReponse> | ErrorResponse;
 }
 
+/**
+ * The HybridConnectivity post operation response
+ */
+#suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model"
+model GenerateAwsTemplateReponse {}
path: specification/hybridconnectivity/HybridConnectivity.Management/PublicCloud.tsp
user: login: ArthurMa1978
body: Typo, `Reponse` to `Response`
created_at: 2025-04-03T03:27:26Z
author_association: MEMBER

PR comments:
user: login: openapi-pipeline-app[bot]
created_at: 2025-04-03T01:53:44Z
body: <h2>Next Steps to Merge</h2>Next steps that must be taken to merge this PR: <br/><ul><li>❌ The required check named <code>SpellCheck</code> has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the <a href="https://aka.ms/ci-fix">aka.ms/ci-fix</a> guide</li></ul>
author_association: NONE
user: login: openapi-pipeline-app[bot]
created_at: 2025-04-03T01:53:44Z
body: PR validation pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-04-03T01:54:43Z
body: ## API Change Check

APIView identified API level changes in this PR and created the following API reviews

| Language | API Review for Package |
|----------|---------|
| Swagger | [Microsoft.HybridConnectivity](https://apiview.dev/Assemblies/Review/f1b49ac9228d4cd895fe549dab592aba?revisionId=87317a847f4440c9a70c1a059c58ddcb) |
| TypeSpec | [Microsoft.HybridConnectivity](https://spa.apiview.dev/review/0cbe4b5d6ee04bc286addfa44695ab6b?activeApiRevisionId=f87909ea71174e7d9ec526a56e3a704c) |
<!-- Fetch URI: https://apiview.dev/api/pullrequests?pullRequestNumber=33687&repoName=Azure/azure-rest-api-specs&commitSHA=fcd7d38205a1d62928fdba2af354bd9a0c07b4ec -->
author_association: NONE