From 2841c796bd17f4f0b80b706def92231cd960f8b4 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 12 Jun 2024 11:55:08 +0800 Subject: [PATCH 1/4] tsp, avs, rename list response to ##List --- specification/vmware/Microsoft.AVS/models.tsp | 5 +++++ specification/vmware/Microsoft.AVS/routes.tsp | 5 ++++- .../Microsoft.AVS/stable/2023-09-01/vmware.json | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/specification/vmware/Microsoft.AVS/models.tsp b/specification/vmware/Microsoft.AVS/models.tsp index a9c4f74bce4a..4b209b31059c 100644 --- a/specification/vmware/Microsoft.AVS/models.tsp +++ b/specification/vmware/Microsoft.AVS/models.tsp @@ -2224,3 +2224,8 @@ model ResourceSkuRequired { @doc("The SKU (Stock Keeping Unit) assigned to this resource.") sku: Foundations.Sku; } + +@doc("The response of a {name} list operation.", Resource) +@friendlyName("{name}List", Resource) +model ResourceList + is Azure.Core.Page; diff --git a/specification/vmware/Microsoft.AVS/routes.tsp b/specification/vmware/Microsoft.AVS/routes.tsp index 8a490e1c769f..59bb7c335e78 100644 --- a/specification/vmware/Microsoft.AVS/routes.tsp +++ b/specification/vmware/Microsoft.AVS/routes.tsp @@ -167,7 +167,10 @@ interface Clusters { interface Datastores { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("Datastores_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + Datastore, + Response = ArmResponse> + >; get is ArmResourceRead; diff --git a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json index e50c56d874fe..6f4a298817f3 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json @@ -1743,7 +1743,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/DatastoreListResult" + "$ref": "#/definitions/DatastoreList" } }, "default": { @@ -7246,7 +7246,7 @@ } ] }, - "DatastoreListResult": { + "DatastoreList": { "type": "object", "description": "The response of a Datastore list operation.", "properties": { From c1416ca8c016762006ef928aca382c4fa0b26a26 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 13 Jun 2024 10:57:56 +0800 Subject: [PATCH 2/4] rename ListResult back to List --- specification/vmware/Microsoft.AVS/routes.tsp | 115 ++++++++++++++---- .../stable/2023-09-01/vmware.json | 90 +++++++------- 2 files changed, 137 insertions(+), 68 deletions(-) diff --git a/specification/vmware/Microsoft.AVS/routes.tsp b/specification/vmware/Microsoft.AVS/routes.tsp index 59bb7c335e78..7a891aeb7286 100644 --- a/specification/vmware/Microsoft.AVS/routes.tsp +++ b/specification/vmware/Microsoft.AVS/routes.tsp @@ -38,9 +38,15 @@ interface Locations { interface PrivateClouds { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("PrivateClouds_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + PrivateCloud, + Response = ArmResponse> + >; - listInSubscription is ArmListBySubscription; + listInSubscription is ArmListBySubscription< + PrivateCloud, + Response = ArmResponse> + >; get is ArmResourceRead; @@ -109,7 +115,10 @@ interface PrivateClouds { interface Clusters { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("Clusters_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + Cluster, + Response = ArmResponse> + >; get is ArmResourceRead; @@ -195,7 +204,10 @@ interface Datastores { interface HcxEnterpriseSites { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("HcxEnterpriseSites_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + HcxEnterpriseSite, + Response = ArmResponse> + >; get is ArmResourceRead; @@ -220,7 +232,10 @@ interface HcxEnterpriseSites { interface Authorizations { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("Authorizations_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + ExpressRouteAuthorization, + Response = ArmResponse> + >; get is ArmResourceRead; @@ -250,7 +265,10 @@ interface Authorizations { interface GlobalReachConnections { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("GlobalReachConnections_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + GlobalReachConnection, + Response = ArmResponse> + >; get is ArmResourceRead; @@ -281,14 +299,20 @@ interface WorkloadNetworks { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetwork, + Response = ArmResponse> + >; } @armResourceOperations interface WorkloadNetworkSegments { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_ListSegments") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetworkSegment, + Response = ArmResponse> + >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_GetSegment") @@ -343,7 +367,10 @@ interface WorkloadNetworkSegments { interface WorkloadNetworkDhcpConfigurations { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_ListDhcp") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetworkDhcp, + Response = ArmResponse> + >; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "DhcpIdParameter should be last, but it is breaking to correct it." #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @@ -413,7 +440,10 @@ interface WorkloadNetworkDhcpConfigurations { interface WorkloadNetworkGateways { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_ListGateways") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetworkGateway, + Response = ArmResponse> + >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_GetGateway") @@ -427,7 +457,10 @@ interface WorkloadNetworkGateways { interface WorkloadNetworkPortMirroringProfiles { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_ListPortMirroring") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetworkPortMirroring, + Response = ArmResponse> + >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_GetPortMirroring") @@ -501,7 +534,10 @@ interface WorkloadNetworkPortMirroringProfiles { interface WorkloadNetworkVmGroups { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_ListVMGroups") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetworkVMGroup, + Response = ArmResponse> + >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_GetVMGroup") @@ -573,7 +609,10 @@ interface WorkloadNetworkVmGroups { interface WorkloadNetworkVirtualMachines { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_ListVirtualMachines") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetworkVirtualMachine, + Response = ArmResponse> + >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_GetVirtualMachine") @@ -587,7 +626,10 @@ interface WorkloadNetworkVirtualMachines { interface WorkloadNetworkDnsServices { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_ListDnsServices") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetworkDnsService, + Response = ArmResponse> + >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_GetDnsService") @@ -661,7 +703,10 @@ interface WorkloadNetworkDnsServices { interface WorkloadNetworkDnsZones { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_ListDnsZones") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetworkDnsZone, + Response = ArmResponse> + >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_GetDnsZone") @@ -734,7 +779,10 @@ interface WorkloadNetworkDnsZones { interface WorkloadNetworkPublicIps { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_ListPublicIPs") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + WorkloadNetworkPublicIP, + Response = ArmResponse> + >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("WorkloadNetworks_GetPublicIP") @@ -785,7 +833,10 @@ interface WorkloadNetworkPublicIps { interface CloudLinks { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("CloudLinks_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + CloudLink, + Response = ArmResponse> + >; get is ArmResourceRead; @@ -810,7 +861,10 @@ interface CloudLinks { interface Addons { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("Addons_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + Addon, + Response = ArmResponse> + >; get is ArmResourceRead; @@ -835,7 +889,10 @@ interface Addons { interface VirtualMachines { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("VirtualMachines_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + VirtualMachine, + Response = ArmResponse> + >; get is ArmResourceRead; @@ -857,7 +914,10 @@ interface VirtualMachines { interface PlacementPolicies { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("PlacementPolicies_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + PlacementPolicy, + Response = ArmResponse> + >; get is ArmResourceRead; @@ -913,7 +973,10 @@ interface PlacementPolicies { interface ScriptPackages { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("ScriptPackages_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + ScriptPackage, + Response = ArmResponse> + >; get is ArmResourceRead; } @@ -922,7 +985,10 @@ interface ScriptPackages { interface ScriptCmdlets { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("ScriptCmdlets_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + ScriptCmdlet, + Response = ArmResponse> + >; get is ArmResourceRead; } @@ -931,7 +997,10 @@ interface ScriptCmdlets { interface ScriptExecutions { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @operationId("ScriptExecutions_List") - list is ArmResourceListByParent; + list is ArmResourceListByParent< + ScriptExecution, + Response = ArmResponse> + >; get is ArmResourceRead; diff --git a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json index 6f4a298817f3..73bf35d2eed1 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json @@ -246,7 +246,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/PrivateCloudListResult" + "$ref": "#/definitions/PrivateCloudList" } }, "default": { @@ -291,7 +291,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/PrivateCloudListResult" + "$ref": "#/definitions/PrivateCloudList" } }, "default": { @@ -610,7 +610,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/AddonListResult" + "$ref": "#/definitions/AddonList" } }, "default": { @@ -884,7 +884,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ExpressRouteAuthorizationListResult" + "$ref": "#/definitions/ExpressRouteAuthorizationList" } }, "default": { @@ -1140,7 +1140,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/CloudLinkListResult" + "$ref": "#/definitions/CloudLinkList" } }, "default": { @@ -1396,7 +1396,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ClusterListResult" + "$ref": "#/definitions/ClusterList" } }, "default": { @@ -2089,7 +2089,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/PlacementPolicyListResult" + "$ref": "#/definitions/PlacementPolicyList" } }, "default": { @@ -2468,7 +2468,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/VirtualMachineListResult" + "$ref": "#/definitions/VirtualMachineList" } }, "default": { @@ -2662,7 +2662,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/GlobalReachConnectionListResult" + "$ref": "#/definitions/GlobalReachConnectionList" } }, "default": { @@ -2918,7 +2918,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/HcxEnterpriseSiteListResult" + "$ref": "#/definitions/HcxEnterpriseSiteList" } }, "default": { @@ -3547,7 +3547,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ScriptExecutionListResult" + "$ref": "#/definitions/ScriptExecutionList" } }, "default": { @@ -3870,7 +3870,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ScriptPackageListResult" + "$ref": "#/definitions/ScriptPackageList" } }, "default": { @@ -3983,7 +3983,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ScriptCmdletListResult" + "$ref": "#/definitions/ScriptCmdletList" } }, "default": { @@ -4096,7 +4096,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkListResult" + "$ref": "#/definitions/WorkloadNetworkList" } }, "default": { @@ -4190,7 +4190,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkDhcpListResult" + "$ref": "#/definitions/WorkloadNetworkDhcpList" } }, "default": { @@ -4502,7 +4502,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkDnsServiceListResult" + "$ref": "#/definitions/WorkloadNetworkDnsServiceList" } }, "default": { @@ -4814,7 +4814,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkDnsZoneListResult" + "$ref": "#/definitions/WorkloadNetworkDnsZoneList" } }, "default": { @@ -5129,7 +5129,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkGatewayListResult" + "$ref": "#/definitions/WorkloadNetworkGatewayList" } }, "default": { @@ -5231,7 +5231,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkPortMirroringListResult" + "$ref": "#/definitions/WorkloadNetworkPortMirroringList" } }, "default": { @@ -5543,7 +5543,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkPublicIPListResult" + "$ref": "#/definitions/WorkloadNetworkPublicIPList" } }, "default": { @@ -5780,7 +5780,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkSegmentListResult" + "$ref": "#/definitions/WorkloadNetworkSegmentList" } }, "default": { @@ -6117,7 +6117,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkVirtualMachineListResult" + "$ref": "#/definitions/WorkloadNetworkVirtualMachineList" } }, "default": { @@ -6219,7 +6219,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkVMGroupListResult" + "$ref": "#/definitions/WorkloadNetworkVMGroupList" } }, "default": { @@ -6561,7 +6561,7 @@ ], "x-ms-discriminator-value": "HCX" }, - "AddonListResult": { + "AddonList": { "type": "object", "description": "The response of a Addon list operation.", "properties": { @@ -6916,7 +6916,7 @@ } ] }, - "CloudLinkListResult": { + "CloudLinkList": { "type": "object", "description": "The response of a CloudLink list operation.", "properties": { @@ -7057,7 +7057,7 @@ } ] }, - "ClusterListResult": { + "ClusterList": { "type": "object", "description": "The response of a Cluster list operation.", "properties": { @@ -7766,7 +7766,7 @@ } ] }, - "ExpressRouteAuthorizationListResult": { + "ExpressRouteAuthorizationList": { "type": "object", "description": "The response of a ExpressRouteAuthorization list operation.", "properties": { @@ -7869,7 +7869,7 @@ } ] }, - "GlobalReachConnectionListResult": { + "GlobalReachConnectionList": { "type": "object", "description": "The response of a GlobalReachConnection list operation.", "properties": { @@ -8010,7 +8010,7 @@ } ] }, - "HcxEnterpriseSiteListResult": { + "HcxEnterpriseSiteList": { "type": "object", "description": "The response of a HcxEnterpriseSite list operation.", "properties": { @@ -8445,7 +8445,7 @@ } ] }, - "PlacementPolicyListResult": { + "PlacementPolicyList": { "type": "object", "description": "The response of a PlacementPolicy list operation.", "properties": { @@ -8716,7 +8716,7 @@ } ] }, - "PrivateCloudListResult": { + "PrivateCloudList": { "type": "object", "description": "The response of a PrivateCloud list operation.", "properties": { @@ -9115,7 +9115,7 @@ ] } }, - "ScriptCmdletListResult": { + "ScriptCmdletList": { "type": "object", "description": "The response of a ScriptCmdlet list operation.", "properties": { @@ -9222,7 +9222,7 @@ } ] }, - "ScriptExecutionListResult": { + "ScriptExecutionList": { "type": "object", "description": "The response of a ScriptExecution list operation.", "properties": { @@ -9508,7 +9508,7 @@ } ] }, - "ScriptPackageListResult": { + "ScriptPackageList": { "type": "object", "description": "The response of a ScriptPackage list operation.", "properties": { @@ -9872,7 +9872,7 @@ } ] }, - "VirtualMachineListResult": { + "VirtualMachineList": { "type": "object", "description": "The response of a VirtualMachine list operation.", "properties": { @@ -10182,7 +10182,7 @@ "dhcpType" ] }, - "WorkloadNetworkDhcpListResult": { + "WorkloadNetworkDhcpList": { "type": "object", "description": "The response of a WorkloadNetworkDhcp list operation.", "properties": { @@ -10367,7 +10367,7 @@ } ] }, - "WorkloadNetworkDnsServiceListResult": { + "WorkloadNetworkDnsServiceList": { "type": "object", "description": "The response of a WorkloadNetworkDnsService list operation.", "properties": { @@ -10512,7 +10512,7 @@ } ] }, - "WorkloadNetworkDnsZoneListResult": { + "WorkloadNetworkDnsZoneList": { "type": "object", "description": "The response of a WorkloadNetworkDnsZone list operation.", "properties": { @@ -10656,7 +10656,7 @@ } ] }, - "WorkloadNetworkGatewayListResult": { + "WorkloadNetworkGatewayList": { "type": "object", "description": "The response of a WorkloadNetworkGateway list operation.", "properties": { @@ -10697,7 +10697,7 @@ } } }, - "WorkloadNetworkListResult": { + "WorkloadNetworkList": { "type": "object", "description": "The response of a WorkloadNetwork list operation.", "properties": { @@ -10738,7 +10738,7 @@ } ] }, - "WorkloadNetworkPortMirroringListResult": { + "WorkloadNetworkPortMirroringList": { "type": "object", "description": "The response of a WorkloadNetworkPortMirroring list operation.", "properties": { @@ -10936,7 +10936,7 @@ } ] }, - "WorkloadNetworkPublicIPListResult": { + "WorkloadNetworkPublicIPList": { "type": "object", "description": "The response of a WorkloadNetworkPublicIP list operation.", "properties": { @@ -11051,7 +11051,7 @@ } ] }, - "WorkloadNetworkSegmentListResult": { + "WorkloadNetworkSegmentList": { "type": "object", "description": "The response of a WorkloadNetworkSegment list operation.", "properties": { @@ -11221,7 +11221,7 @@ } ] }, - "WorkloadNetworkVMGroupListResult": { + "WorkloadNetworkVMGroupList": { "type": "object", "description": "The response of a WorkloadNetworkVMGroup list operation.", "properties": { @@ -11354,7 +11354,7 @@ } ] }, - "WorkloadNetworkVirtualMachineListResult": { + "WorkloadNetworkVirtualMachineList": { "type": "object", "description": "The response of a WorkloadNetworkVirtualMachine list operation.", "properties": { From 9854edb2e708eb1815289a412be963bf773572b9 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 13 Jun 2024 11:42:19 +0800 Subject: [PATCH 3/4] handle the plural --- specification/vmware/Microsoft.AVS/models.tsp | 8 +- specification/vmware/Microsoft.AVS/routes.tsp | 33 +- .../stable/2023-09-01/vmware.json | 507 +++++++++--------- 3 files changed, 290 insertions(+), 258 deletions(-) diff --git a/specification/vmware/Microsoft.AVS/models.tsp b/specification/vmware/Microsoft.AVS/models.tsp index 4b209b31059c..c1989f67724b 100644 --- a/specification/vmware/Microsoft.AVS/models.tsp +++ b/specification/vmware/Microsoft.AVS/models.tsp @@ -2226,6 +2226,8 @@ model ResourceSkuRequired { } @doc("The response of a {name} list operation.", Resource) -@friendlyName("{name}List", Resource) -model ResourceList - is Azure.Core.Page; +@friendlyName(FriendlyNameFormat, Resource) +model ResourceList< + Resource extends Foundations.Resource, + FriendlyNameFormat extends valueof string = "{name}List" +> is Azure.Core.Page; diff --git a/specification/vmware/Microsoft.AVS/routes.tsp b/specification/vmware/Microsoft.AVS/routes.tsp index 7a891aeb7286..8cbb75caeb83 100644 --- a/specification/vmware/Microsoft.AVS/routes.tsp +++ b/specification/vmware/Microsoft.AVS/routes.tsp @@ -40,7 +40,7 @@ interface PrivateClouds { @operationId("PrivateClouds_List") list is ArmResourceListByParent< PrivateCloud, - Response = ArmResponse> + Response = ArmResponse> >; listInSubscription is ArmListBySubscription< @@ -311,7 +311,7 @@ interface WorkloadNetworkSegments { @operationId("WorkloadNetworks_ListSegments") list is ArmResourceListByParent< WorkloadNetworkSegment, - Response = ArmResponse> + Response = ArmResponse> >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @@ -536,7 +536,7 @@ interface WorkloadNetworkVmGroups { @operationId("WorkloadNetworks_ListVMGroups") list is ArmResourceListByParent< WorkloadNetworkVMGroup, - Response = ArmResponse> + Response = ArmResponse> >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @@ -611,7 +611,10 @@ interface WorkloadNetworkVirtualMachines { @operationId("WorkloadNetworks_ListVirtualMachines") list is ArmResourceListByParent< WorkloadNetworkVirtualMachine, - Response = ArmResponse> + Response = ArmResponse> >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @@ -628,7 +631,10 @@ interface WorkloadNetworkDnsServices { @operationId("WorkloadNetworks_ListDnsServices") list is ArmResourceListByParent< WorkloadNetworkDnsService, - Response = ArmResponse> + Response = ArmResponse> >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @@ -705,7 +711,7 @@ interface WorkloadNetworkDnsZones { @operationId("WorkloadNetworks_ListDnsZones") list is ArmResourceListByParent< WorkloadNetworkDnsZone, - Response = ArmResponse> + Response = ArmResponse> >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @@ -781,7 +787,7 @@ interface WorkloadNetworkPublicIps { @operationId("WorkloadNetworks_ListPublicIPs") list is ArmResourceListByParent< WorkloadNetworkPublicIP, - Response = ArmResponse> + Response = ArmResponse> >; #suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId." @@ -891,7 +897,7 @@ interface VirtualMachines { @operationId("VirtualMachines_List") list is ArmResourceListByParent< VirtualMachine, - Response = ArmResponse> + Response = ArmResponse> >; get is ArmResourceRead; @@ -916,7 +922,10 @@ interface PlacementPolicies { @operationId("PlacementPolicies_List") list is ArmResourceListByParent< PlacementPolicy, - Response = ArmResponse> + Response = ArmResponse> >; get is ArmResourceRead; @@ -975,7 +984,7 @@ interface ScriptPackages { @operationId("ScriptPackages_List") list is ArmResourceListByParent< ScriptPackage, - Response = ArmResponse> + Response = ArmResponse> >; get is ArmResourceRead; @@ -987,7 +996,7 @@ interface ScriptCmdlets { @operationId("ScriptCmdlets_List") list is ArmResourceListByParent< ScriptCmdlet, - Response = ArmResponse> + Response = ArmResponse> >; get is ArmResourceRead; @@ -999,7 +1008,7 @@ interface ScriptExecutions { @operationId("ScriptExecutions_List") list is ArmResourceListByParent< ScriptExecution, - Response = ArmResponse> + Response = ArmResponse> >; get is ArmResourceRead; diff --git a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json index 73bf35d2eed1..741c120fef10 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json @@ -291,7 +291,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/PrivateCloudList" + "$ref": "#/definitions/PrivateCloudsList" } }, "default": { @@ -2089,7 +2089,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/PlacementPolicyList" + "$ref": "#/definitions/PlacementPoliciesList" } }, "default": { @@ -2468,7 +2468,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/VirtualMachineList" + "$ref": "#/definitions/VirtualMachinesList" } }, "default": { @@ -3547,7 +3547,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ScriptExecutionList" + "$ref": "#/definitions/ScriptExecutionsList" } }, "default": { @@ -3870,7 +3870,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ScriptPackageList" + "$ref": "#/definitions/ScriptPackagesList" } }, "default": { @@ -3983,7 +3983,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ScriptCmdletList" + "$ref": "#/definitions/ScriptCmdletsList" } }, "default": { @@ -4502,7 +4502,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkDnsServiceList" + "$ref": "#/definitions/WorkloadNetworkDnsServicesList" } }, "default": { @@ -4814,7 +4814,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkDnsZoneList" + "$ref": "#/definitions/WorkloadNetworkDnsZonesList" } }, "default": { @@ -5543,7 +5543,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkPublicIPList" + "$ref": "#/definitions/WorkloadNetworkPublicIPsList" } }, "default": { @@ -5780,7 +5780,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkSegmentList" + "$ref": "#/definitions/WorkloadNetworkSegmentsList" } }, "default": { @@ -6117,7 +6117,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkVirtualMachineList" + "$ref": "#/definitions/WorkloadNetworkVirtualMachinesList" } }, "default": { @@ -6219,7 +6219,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/WorkloadNetworkVMGroupList" + "$ref": "#/definitions/WorkloadNetworkVMGroupsList" } }, "default": { @@ -8425,27 +8425,7 @@ ], "x-ms-discriminator-value": "Credential" }, - "PlacementPolicy": { - "type": "object", - "description": "A vSphere Distributed Resource Scheduler (DRS) placement policy", - "properties": { - "properties": { - "$ref": "#/definitions/PlacementPolicyProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] - } - }, - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" - } - ] - }, - "PlacementPolicyList": { + "PlacementPoliciesList": { "type": "object", "description": "The response of a PlacementPolicy list operation.", "properties": { @@ -8466,6 +8446,26 @@ "value" ] }, + "PlacementPolicy": { + "type": "object", + "description": "A vSphere Distributed Resource Scheduler (DRS) placement policy", + "properties": { + "properties": { + "$ref": "#/definitions/PlacementPolicyProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, "PlacementPolicyProperties": { "type": "object", "description": "Abstract placement policy properties", @@ -9027,6 +9027,27 @@ } } }, + "PrivateCloudsList": { + "type": "object", + "description": "The response of a PrivateCloud list operation.", + "properties": { + "value": { + "type": "array", + "description": "The PrivateCloud items on this page", + "items": { + "$ref": "#/definitions/PrivateCloud" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "Quota": { "type": "object", "description": "Subscription quotas", @@ -9115,27 +9136,6 @@ ] } }, - "ScriptCmdletList": { - "type": "object", - "description": "The response of a ScriptCmdlet list operation.", - "properties": { - "value": { - "type": "array", - "description": "The ScriptCmdlet items on this page", - "items": { - "$ref": "#/definitions/ScriptCmdlet" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "ScriptCmdletProperties": { "type": "object", "description": "Properties of a pre-canned script", @@ -9202,6 +9202,27 @@ }, "readOnly": true }, + "ScriptCmdletsList": { + "type": "object", + "description": "The response of a ScriptCmdlet list operation.", + "properties": { + "value": { + "type": "array", + "description": "The ScriptCmdlet items on this page", + "items": { + "$ref": "#/definitions/ScriptCmdlet" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "ScriptExecution": { "type": "object", "description": "An instance of a script executed by a user - custom or AVS", @@ -9222,27 +9243,6 @@ } ] }, - "ScriptExecutionList": { - "type": "object", - "description": "The response of a ScriptExecution list operation.", - "properties": { - "value": { - "type": "array", - "description": "The ScriptExecution items on this page", - "items": { - "$ref": "#/definitions/ScriptExecution" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "ScriptExecutionParameter": { "type": "object", "description": "The arguments passed in to the execution", @@ -9452,6 +9452,27 @@ }, "readOnly": true }, + "ScriptExecutionsList": { + "type": "object", + "description": "The response of a ScriptExecution list operation.", + "properties": { + "value": { + "type": "array", + "description": "The ScriptExecution items on this page", + "items": { + "$ref": "#/definitions/ScriptExecution" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "ScriptOutputStreamType": { "type": "string", "description": "Script Output Stream type", @@ -9508,27 +9529,6 @@ } ] }, - "ScriptPackageList": { - "type": "object", - "description": "The response of a ScriptPackage list operation.", - "properties": { - "value": { - "type": "array", - "description": "The ScriptPackage items on this page", - "items": { - "$ref": "#/definitions/ScriptPackage" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "ScriptPackageProperties": { "type": "object", "description": "Properties of a Script Package subresource", @@ -9591,6 +9591,27 @@ }, "readOnly": true }, + "ScriptPackagesList": { + "type": "object", + "description": "The response of a ScriptPackage list operation.", + "properties": { + "value": { + "type": "array", + "description": "The ScriptPackage items on this page", + "items": { + "$ref": "#/definitions/ScriptPackage" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "ScriptParameter": { "type": "object", "description": "An parameter that the script will accept", @@ -9872,27 +9893,6 @@ } ] }, - "VirtualMachineList": { - "type": "object", - "description": "The response of a VirtualMachine list operation.", - "properties": { - "value": { - "type": "array", - "description": "The VirtualMachine items on this page", - "items": { - "$ref": "#/definitions/VirtualMachine" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "VirtualMachineProperties": { "type": "object", "description": "Virtual Machine Properties", @@ -9989,6 +9989,27 @@ ] } }, + "VirtualMachinesList": { + "type": "object", + "description": "The response of a VirtualMachine list operation.", + "properties": { + "value": { + "type": "array", + "description": "The VirtualMachine items on this page", + "items": { + "$ref": "#/definitions/VirtualMachine" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "VisibilityParameterEnum": { "type": "string", "description": "Visibility Parameter", @@ -10367,27 +10388,6 @@ } ] }, - "WorkloadNetworkDnsServiceList": { - "type": "object", - "description": "The response of a WorkloadNetworkDnsService list operation.", - "properties": { - "value": { - "type": "array", - "description": "The WorkloadNetworkDnsService items on this page", - "items": { - "$ref": "#/definitions/WorkloadNetworkDnsService" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "WorkloadNetworkDnsServiceProperties": { "type": "object", "description": "NSX DNS Service Properties", @@ -10492,6 +10492,27 @@ } } }, + "WorkloadNetworkDnsServicesList": { + "type": "object", + "description": "The response of a WorkloadNetworkDnsService list operation.", + "properties": { + "value": { + "type": "array", + "description": "The WorkloadNetworkDnsService items on this page", + "items": { + "$ref": "#/definitions/WorkloadNetworkDnsService" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "WorkloadNetworkDnsZone": { "type": "object", "description": "NSX DNS Zone", @@ -10512,27 +10533,6 @@ } ] }, - "WorkloadNetworkDnsZoneList": { - "type": "object", - "description": "The response of a WorkloadNetworkDnsZone list operation.", - "properties": { - "value": { - "type": "array", - "description": "The WorkloadNetworkDnsZone items on this page", - "items": { - "$ref": "#/definitions/WorkloadNetworkDnsZone" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "WorkloadNetworkDnsZoneProperties": { "type": "object", "description": "NSX DNS Zone Properties", @@ -10636,6 +10636,27 @@ } } }, + "WorkloadNetworkDnsZonesList": { + "type": "object", + "description": "The response of a WorkloadNetworkDnsZone list operation.", + "properties": { + "value": { + "type": "array", + "description": "The WorkloadNetworkDnsZone items on this page", + "items": { + "$ref": "#/definitions/WorkloadNetworkDnsZone" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "WorkloadNetworkGateway": { "type": "object", "description": "NSX Gateway.", @@ -10936,27 +10957,6 @@ } ] }, - "WorkloadNetworkPublicIPList": { - "type": "object", - "description": "The response of a WorkloadNetworkPublicIP list operation.", - "properties": { - "value": { - "type": "array", - "description": "The WorkloadNetworkPublicIP items on this page", - "items": { - "$ref": "#/definitions/WorkloadNetworkPublicIP" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "WorkloadNetworkPublicIPProperties": { "type": "object", "description": "NSX Public IP Block Properties", @@ -11031,6 +11031,27 @@ }, "readOnly": true }, + "WorkloadNetworkPublicIPsList": { + "type": "object", + "description": "The response of a WorkloadNetworkPublicIP list operation.", + "properties": { + "value": { + "type": "array", + "description": "The WorkloadNetworkPublicIP items on this page", + "items": { + "$ref": "#/definitions/WorkloadNetworkPublicIP" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "WorkloadNetworkSegment": { "type": "object", "description": "NSX Segment", @@ -11051,27 +11072,6 @@ } ] }, - "WorkloadNetworkSegmentList": { - "type": "object", - "description": "The response of a WorkloadNetworkSegment list operation.", - "properties": { - "value": { - "type": "array", - "description": "The WorkloadNetworkSegment items on this page", - "items": { - "$ref": "#/definitions/WorkloadNetworkSegment" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "WorkloadNetworkSegmentPortVif": { "type": "object", "description": "Ports and any VIF attached to segment.", @@ -11201,6 +11201,27 @@ } } }, + "WorkloadNetworkSegmentsList": { + "type": "object", + "description": "The response of a WorkloadNetworkSegment list operation.", + "properties": { + "value": { + "type": "array", + "description": "The WorkloadNetworkSegment items on this page", + "items": { + "$ref": "#/definitions/WorkloadNetworkSegment" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "WorkloadNetworkVMGroup": { "type": "object", "description": "NSX VM Group", @@ -11221,27 +11242,6 @@ } ] }, - "WorkloadNetworkVMGroupList": { - "type": "object", - "description": "The response of a WorkloadNetworkVMGroup list operation.", - "properties": { - "value": { - "type": "array", - "description": "The WorkloadNetworkVMGroup items on this page", - "items": { - "$ref": "#/definitions/WorkloadNetworkVMGroup" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "WorkloadNetworkVMGroupProperties": { "type": "object", "description": "NSX VM Group Properties", @@ -11334,6 +11334,27 @@ } } }, + "WorkloadNetworkVMGroupsList": { + "type": "object", + "description": "The response of a WorkloadNetworkVMGroup list operation.", + "properties": { + "value": { + "type": "array", + "description": "The WorkloadNetworkVMGroup items on this page", + "items": { + "$ref": "#/definitions/WorkloadNetworkVMGroup" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "WorkloadNetworkVirtualMachine": { "type": "object", "description": "NSX Virtual Machine", @@ -11354,27 +11375,6 @@ } ] }, - "WorkloadNetworkVirtualMachineList": { - "type": "object", - "description": "The response of a WorkloadNetworkVirtualMachine list operation.", - "properties": { - "value": { - "type": "array", - "description": "The WorkloadNetworkVirtualMachine items on this page", - "items": { - "$ref": "#/definitions/WorkloadNetworkVirtualMachine" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "WorkloadNetworkVirtualMachineProperties": { "type": "object", "description": "NSX Virtual Machine Properties", @@ -11394,6 +11394,27 @@ "readOnly": true } } + }, + "WorkloadNetworkVirtualMachinesList": { + "type": "object", + "description": "The response of a WorkloadNetworkVirtualMachine list operation.", + "properties": { + "value": { + "type": "array", + "description": "The WorkloadNetworkVirtualMachine items on this page", + "items": { + "$ref": "#/definitions/WorkloadNetworkVirtualMachine" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] } }, "parameters": { From eb8c29ae63110f8534f0c9cff91fedb8b0cf3750 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 13 Jun 2024 12:13:13 +0800 Subject: [PATCH 4/4] fix --- specification/vmware/Microsoft.AVS/routes.tsp | 2 +- .../stable/2023-09-01/vmware.json | 23 +------------------ 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/specification/vmware/Microsoft.AVS/routes.tsp b/specification/vmware/Microsoft.AVS/routes.tsp index 8cbb75caeb83..6cb36ffd5f2c 100644 --- a/specification/vmware/Microsoft.AVS/routes.tsp +++ b/specification/vmware/Microsoft.AVS/routes.tsp @@ -40,7 +40,7 @@ interface PrivateClouds { @operationId("PrivateClouds_List") list is ArmResourceListByParent< PrivateCloud, - Response = ArmResponse> + Response = ArmResponse> >; listInSubscription is ArmListBySubscription< diff --git a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json index 741c120fef10..81a5cb077afb 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json @@ -291,7 +291,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/PrivateCloudsList" + "$ref": "#/definitions/PrivateCloudList" } }, "default": { @@ -9027,27 +9027,6 @@ } } }, - "PrivateCloudsList": { - "type": "object", - "description": "The response of a PrivateCloud list operation.", - "properties": { - "value": { - "type": "array", - "description": "The PrivateCloud items on this page", - "items": { - "$ref": "#/definitions/PrivateCloud" - } - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "required": [ - "value" - ] - }, "Quota": { "type": "object", "description": "Subscription quotas",