Skip to content

Commit 2209f9b

Browse files
tsp, avs, rename List API response schema back to ##List (#29408)
1 parent 30c95a2 commit 2209f9b

File tree

3 files changed

+379
-291
lines changed

3 files changed

+379
-291
lines changed

specification/vmware/Microsoft.AVS/models.tsp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,3 +2224,10 @@ model ResourceSkuRequired {
22242224
@doc("The SKU (Stock Keeping Unit) assigned to this resource.")
22252225
sku: Foundations.Sku;
22262226
}
2227+
2228+
@doc("The response of a {name} list operation.", Resource)
2229+
@friendlyName(FriendlyNameFormat, Resource)
2230+
model ResourceList<
2231+
Resource extends Foundations.Resource,
2232+
FriendlyNameFormat extends valueof string = "{name}List"
2233+
> is Azure.Core.Page<Resource>;

specification/vmware/Microsoft.AVS/routes.tsp

Lines changed: 105 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,15 @@ interface Locations {
3838
interface PrivateClouds {
3939
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
4040
@operationId("PrivateClouds_List")
41-
list is ArmResourceListByParent<PrivateCloud>;
41+
list is ArmResourceListByParent<
42+
PrivateCloud,
43+
Response = ArmResponse<ResourceList<PrivateCloud>>
44+
>;
4245

43-
listInSubscription is ArmListBySubscription<PrivateCloud>;
46+
listInSubscription is ArmListBySubscription<
47+
PrivateCloud,
48+
Response = ArmResponse<ResourceList<PrivateCloud>>
49+
>;
4450

4551
get is ArmResourceRead<PrivateCloud>;
4652

@@ -109,7 +115,10 @@ interface PrivateClouds {
109115
interface Clusters {
110116
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
111117
@operationId("Clusters_List")
112-
list is ArmResourceListByParent<Cluster>;
118+
list is ArmResourceListByParent<
119+
Cluster,
120+
Response = ArmResponse<ResourceList<Cluster>>
121+
>;
113122

114123
get is ArmResourceRead<Cluster>;
115124

@@ -167,7 +176,10 @@ interface Clusters {
167176
interface Datastores {
168177
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
169178
@operationId("Datastores_List")
170-
list is ArmResourceListByParent<Datastore>;
179+
list is ArmResourceListByParent<
180+
Datastore,
181+
Response = ArmResponse<ResourceList<Datastore>>
182+
>;
171183

172184
get is ArmResourceRead<Datastore>;
173185

@@ -192,7 +204,10 @@ interface Datastores {
192204
interface HcxEnterpriseSites {
193205
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
194206
@operationId("HcxEnterpriseSites_List")
195-
list is ArmResourceListByParent<HcxEnterpriseSite>;
207+
list is ArmResourceListByParent<
208+
HcxEnterpriseSite,
209+
Response = ArmResponse<ResourceList<HcxEnterpriseSite>>
210+
>;
196211

197212
get is ArmResourceRead<HcxEnterpriseSite>;
198213

@@ -217,7 +232,10 @@ interface HcxEnterpriseSites {
217232
interface Authorizations {
218233
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
219234
@operationId("Authorizations_List")
220-
list is ArmResourceListByParent<ExpressRouteAuthorization>;
235+
list is ArmResourceListByParent<
236+
ExpressRouteAuthorization,
237+
Response = ArmResponse<ResourceList<ExpressRouteAuthorization>>
238+
>;
221239

222240
get is ArmResourceRead<ExpressRouteAuthorization>;
223241

@@ -247,7 +265,10 @@ interface Authorizations {
247265
interface GlobalReachConnections {
248266
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
249267
@operationId("GlobalReachConnections_List")
250-
list is ArmResourceListByParent<GlobalReachConnection>;
268+
list is ArmResourceListByParent<
269+
GlobalReachConnection,
270+
Response = ArmResponse<ResourceList<GlobalReachConnection>>
271+
>;
251272

252273
get is ArmResourceRead<GlobalReachConnection>;
253274

@@ -278,14 +299,20 @@ interface WorkloadNetworks {
278299

279300
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
280301
@operationId("WorkloadNetworks_List")
281-
list is ArmResourceListByParent<WorkloadNetwork>;
302+
list is ArmResourceListByParent<
303+
WorkloadNetwork,
304+
Response = ArmResponse<ResourceList<WorkloadNetwork>>
305+
>;
282306
}
283307

284308
@armResourceOperations
285309
interface WorkloadNetworkSegments {
286310
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
287311
@operationId("WorkloadNetworks_ListSegments")
288-
list is ArmResourceListByParent<WorkloadNetworkSegment>;
312+
list is ArmResourceListByParent<
313+
WorkloadNetworkSegment,
314+
Response = ArmResponse<ResourceList<WorkloadNetworkSegment, "{name}sList">>
315+
>;
289316

290317
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
291318
@operationId("WorkloadNetworks_GetSegment")
@@ -340,7 +367,10 @@ interface WorkloadNetworkSegments {
340367
interface WorkloadNetworkDhcpConfigurations {
341368
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
342369
@operationId("WorkloadNetworks_ListDhcp")
343-
list is ArmResourceListByParent<WorkloadNetworkDhcp>;
370+
list is ArmResourceListByParent<
371+
WorkloadNetworkDhcp,
372+
Response = ArmResponse<ResourceList<WorkloadNetworkDhcp>>
373+
>;
344374

345375
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "DhcpIdParameter should be last, but it is breaking to correct it."
346376
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
@@ -410,7 +440,10 @@ interface WorkloadNetworkDhcpConfigurations {
410440
interface WorkloadNetworkGateways {
411441
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
412442
@operationId("WorkloadNetworks_ListGateways")
413-
list is ArmResourceListByParent<WorkloadNetworkGateway>;
443+
list is ArmResourceListByParent<
444+
WorkloadNetworkGateway,
445+
Response = ArmResponse<ResourceList<WorkloadNetworkGateway>>
446+
>;
414447

415448
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
416449
@operationId("WorkloadNetworks_GetGateway")
@@ -424,7 +457,10 @@ interface WorkloadNetworkGateways {
424457
interface WorkloadNetworkPortMirroringProfiles {
425458
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
426459
@operationId("WorkloadNetworks_ListPortMirroring")
427-
list is ArmResourceListByParent<WorkloadNetworkPortMirroring>;
460+
list is ArmResourceListByParent<
461+
WorkloadNetworkPortMirroring,
462+
Response = ArmResponse<ResourceList<WorkloadNetworkPortMirroring>>
463+
>;
428464

429465
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
430466
@operationId("WorkloadNetworks_GetPortMirroring")
@@ -498,7 +534,10 @@ interface WorkloadNetworkPortMirroringProfiles {
498534
interface WorkloadNetworkVmGroups {
499535
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
500536
@operationId("WorkloadNetworks_ListVMGroups")
501-
list is ArmResourceListByParent<WorkloadNetworkVMGroup>;
537+
list is ArmResourceListByParent<
538+
WorkloadNetworkVMGroup,
539+
Response = ArmResponse<ResourceList<WorkloadNetworkVMGroup, "{name}sList">>
540+
>;
502541

503542
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
504543
@operationId("WorkloadNetworks_GetVMGroup")
@@ -570,7 +609,13 @@ interface WorkloadNetworkVmGroups {
570609
interface WorkloadNetworkVirtualMachines {
571610
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
572611
@operationId("WorkloadNetworks_ListVirtualMachines")
573-
list is ArmResourceListByParent<WorkloadNetworkVirtualMachine>;
612+
list is ArmResourceListByParent<
613+
WorkloadNetworkVirtualMachine,
614+
Response = ArmResponse<ResourceList<
615+
WorkloadNetworkVirtualMachine,
616+
"{name}sList"
617+
>>
618+
>;
574619

575620
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
576621
@operationId("WorkloadNetworks_GetVirtualMachine")
@@ -584,7 +629,13 @@ interface WorkloadNetworkVirtualMachines {
584629
interface WorkloadNetworkDnsServices {
585630
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
586631
@operationId("WorkloadNetworks_ListDnsServices")
587-
list is ArmResourceListByParent<WorkloadNetworkDnsService>;
632+
list is ArmResourceListByParent<
633+
WorkloadNetworkDnsService,
634+
Response = ArmResponse<ResourceList<
635+
WorkloadNetworkDnsService,
636+
"{name}sList"
637+
>>
638+
>;
588639

589640
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
590641
@operationId("WorkloadNetworks_GetDnsService")
@@ -658,7 +709,10 @@ interface WorkloadNetworkDnsServices {
658709
interface WorkloadNetworkDnsZones {
659710
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
660711
@operationId("WorkloadNetworks_ListDnsZones")
661-
list is ArmResourceListByParent<WorkloadNetworkDnsZone>;
712+
list is ArmResourceListByParent<
713+
WorkloadNetworkDnsZone,
714+
Response = ArmResponse<ResourceList<WorkloadNetworkDnsZone, "{name}sList">>
715+
>;
662716

663717
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
664718
@operationId("WorkloadNetworks_GetDnsZone")
@@ -731,7 +785,10 @@ interface WorkloadNetworkDnsZones {
731785
interface WorkloadNetworkPublicIps {
732786
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
733787
@operationId("WorkloadNetworks_ListPublicIPs")
734-
list is ArmResourceListByParent<WorkloadNetworkPublicIP>;
788+
list is ArmResourceListByParent<
789+
WorkloadNetworkPublicIP,
790+
Response = ArmResponse<ResourceList<WorkloadNetworkPublicIP, "{name}sList">>
791+
>;
735792

736793
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
737794
@operationId("WorkloadNetworks_GetPublicIP")
@@ -782,7 +839,10 @@ interface WorkloadNetworkPublicIps {
782839
interface CloudLinks {
783840
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
784841
@operationId("CloudLinks_List")
785-
list is ArmResourceListByParent<CloudLink>;
842+
list is ArmResourceListByParent<
843+
CloudLink,
844+
Response = ArmResponse<ResourceList<CloudLink>>
845+
>;
786846

787847
get is ArmResourceRead<CloudLink>;
788848

@@ -807,7 +867,10 @@ interface CloudLinks {
807867
interface Addons {
808868
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
809869
@operationId("Addons_List")
810-
list is ArmResourceListByParent<Addon>;
870+
list is ArmResourceListByParent<
871+
Addon,
872+
Response = ArmResponse<ResourceList<Addon>>
873+
>;
811874

812875
get is ArmResourceRead<Addon>;
813876

@@ -832,7 +895,10 @@ interface Addons {
832895
interface VirtualMachines {
833896
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
834897
@operationId("VirtualMachines_List")
835-
list is ArmResourceListByParent<VirtualMachine>;
898+
list is ArmResourceListByParent<
899+
VirtualMachine,
900+
Response = ArmResponse<ResourceList<VirtualMachine, "{name}sList">>
901+
>;
836902

837903
get is ArmResourceRead<VirtualMachine>;
838904

@@ -854,7 +920,13 @@ interface VirtualMachines {
854920
interface PlacementPolicies {
855921
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
856922
@operationId("PlacementPolicies_List")
857-
list is ArmResourceListByParent<PlacementPolicy>;
923+
list is ArmResourceListByParent<
924+
PlacementPolicy,
925+
Response = ArmResponse<ResourceList<
926+
PlacementPolicy,
927+
"PlacementPoliciesList"
928+
>>
929+
>;
858930

859931
get is ArmResourceRead<PlacementPolicy>;
860932

@@ -910,7 +982,10 @@ interface PlacementPolicies {
910982
interface ScriptPackages {
911983
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
912984
@operationId("ScriptPackages_List")
913-
list is ArmResourceListByParent<ScriptPackage>;
985+
list is ArmResourceListByParent<
986+
ScriptPackage,
987+
Response = ArmResponse<ResourceList<ScriptPackage, "{name}sList">>
988+
>;
914989

915990
get is ArmResourceRead<ScriptPackage>;
916991
}
@@ -919,7 +994,10 @@ interface ScriptPackages {
919994
interface ScriptCmdlets {
920995
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
921996
@operationId("ScriptCmdlets_List")
922-
list is ArmResourceListByParent<ScriptCmdlet>;
997+
list is ArmResourceListByParent<
998+
ScriptCmdlet,
999+
Response = ArmResponse<ResourceList<ScriptCmdlet, "{name}sList">>
1000+
>;
9231001

9241002
get is ArmResourceRead<ScriptCmdlet>;
9251003
}
@@ -928,7 +1006,10 @@ interface ScriptCmdlets {
9281006
interface ScriptExecutions {
9291007
#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Can not change existing operationId."
9301008
@operationId("ScriptExecutions_List")
931-
list is ArmResourceListByParent<ScriptExecution>;
1009+
list is ArmResourceListByParent<
1010+
ScriptExecution,
1011+
Response = ArmResponse<ResourceList<ScriptExecution, "{name}sList">>
1012+
>;
9321013

9331014
get is ArmResourceRead<ScriptExecution>;
9341015

0 commit comments

Comments
 (0)