@@ -17,6 +17,7 @@ clear-output-folder: true
1717sample-gen :
1818 output-folder : $(this-folder)/../samples/Generated
1919 clear-output-folder : true
20+ sample : false
2021skip-csproj : true
2122modelerfour :
2223 flatten-payloads : false
@@ -422,4 +423,66 @@ directive:
422423 where : $.definitions.VMSizeProperties
423424 transform : >
424425 $.additionalProperties = true;
426+
427+ # in new swagger:
428+ - from : ComputeRP.json
429+ where : $.definitions
430+ transform : >
431+ $.VirtualMachineInstallPatchesParameters.properties.maximumDuration["format"] = "duration";
432+ - from : ComputeRP.json
433+ where : $.definitions
434+ transform : >
435+ $.VirtualMachineImageProperties.properties.dataDiskImages.description = "The list of data disk images information.";
436+ # resolve the duplicate schema issue
437+ - from : DiskRP.json
438+ where : $.definitions
439+ transform : >
440+ $.GrantAccessData.properties.access.description = "The Access Level, accepted values include None, Read, Write.";
441+ - from : DiskRP.json
442+ where : $.definitions
443+ transform : >
444+ $.Disk.properties.managedByExtended.items["x-ms-format"] = "arm-id";
445+ - from : cloudService.json
446+ where : $.definitions
447+ transform : >
448+ $.CloudService.properties.properties["x-ms-client-flatten"] = true;
449+ $.OSFamily.properties.properties["x-ms-client-flatten"] = true;
450+ $.OSVersion.properties.properties["x-ms-client-flatten"] = true;
451+ $.Extension.properties.properties["x-ms-client-flatten"] = true;
452+ $.CloudServiceRole.properties.properties["x-ms-client-flatten"] = true;
453+ $.RoleInstance.properties.properties["x-ms-client-flatten"] = true;
454+ $.LoadBalancerConfiguration.properties.properties["x-ms-client-flatten"] = true;
455+ $.LoadBalancerFrontendIpConfiguration.properties.properties["x-ms-client-flatten"] = true;
456+ # this makes the name in VirtualMachineScaleSetExtension to be readonly so that our inheritance chooser could properly make it inherit from Azure.ResourceManager.ResourceData. We have some customized code to add the setter for name back (as in constructor)
457+ - from : ComputeRP.json
458+ where : $.definitions.VirtualMachineScaleSetExtension.properties.name
459+ transform : $["readOnly"] = true;
460+ # add a json converter to this model
461+ - from : swagger-document
462+ where : $.definitions.KeyVaultSecretReference
463+ transform : $["x-csharp-usage"] = "converter";
464+ # TODO -- to be removed. This is a temporary workaround because the rename-mapping configuration is not working properly on arrays.
465+ - from : ComputeRP.json
466+ where : $.definitions.RestorePointSourceVMStorageProfile.properties.dataDisks
467+ transform : $["x-ms-client-name"] = "DataDiskList";
468+ # Add a dummy property because generator tries to flatten automaticallyApprove in both UserInitiatedRedeploy and UserInitiatedReboot
469+ - from : ComputeRP.json
470+ where : $.definitions.UserInitiatedRedeploy.properties
471+ transform : >
472+ $.dummyProperty = {
473+ "type": "string",
474+ "description": "This is a dummy property to prevent flattening."
475+ };
476+ # add additionalproperties to a few models to support private properties supported by the service
477+ - from : ComputeRP.json
478+ where : $.definitions
479+ transform : >
480+ $.VirtualMachineScaleSetProperties.additionalProperties = true;
481+ $.VirtualMachineScaleSet.properties.properties["x-ms-client-flatten"] = false;
482+ $.VirtualMachineScaleSetUpdate.properties.properties["x-ms-client-flatten"] = false;
483+ $.UpgradePolicy.additionalProperties = true;
484+ - from : ComputeRP.json
485+ where : $.definitions.VMSizeProperties
486+ transform : >
487+ $.additionalProperties = true;
425488` ` `
0 commit comments