diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/Advisor/tspconfig.yaml b/specification/advisor/resource-manager/Microsoft.Advisor/Advisor/tspconfig.yaml index 4787f21c19da..48dfe4d875d2 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/Advisor/tspconfig.yaml +++ b/specification/advisor/resource-manager/Microsoft.Advisor/Advisor/tspconfig.yaml @@ -12,7 +12,7 @@ options: output-file: "{version-status}/{version}/openapi.json" examples-dir: "{project-root}/examples" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - arm-resource-flattening: true + "@azure-tools/typespec-python": emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-advisor" namespace: "azure.mgmt.advisor" diff --git a/specification/apicenter/ApiCenter.Management/back-compatible.tsp b/specification/apicenter/ApiCenter.Management/back-compatible.tsp new file mode 100644 index 000000000000..9276e157d9fa --- /dev/null +++ b/specification/apicenter/ApiCenter.Management/back-compatible.tsp @@ -0,0 +1,35 @@ +// Contains overrides to make the Autorest Swagger2.0 back compatible +using Microsoft.ApiCenter; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Api.properties, "autorest"); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ApiDefinition.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ApiVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DeletedService.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Deployment.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Environment.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(MetadataSchema.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Service.properties, + "autorest" +); +// For ServiceUpdate +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Workspace.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ApiSource.properties, + "autorest" +); diff --git a/specification/apicenter/ApiCenter.Management/main.tsp b/specification/apicenter/ApiCenter.Management/main.tsp index 1a84aabe2259..44e18d8daaeb 100644 --- a/specification/apicenter/ApiCenter.Management/main.tsp +++ b/specification/apicenter/ApiCenter.Management/main.tsp @@ -15,6 +15,7 @@ import "./ApiDefinition.tsp"; import "./ApiSource.tsp"; import "./Deployment.tsp"; import "./Environment.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Rest; using TypeSpec.Http; diff --git a/specification/apicenter/ApiCenter.Management/tspconfig.yaml b/specification/apicenter/ApiCenter.Management/tspconfig.yaml index 3463917ab3c3..17fe9f5d5acb 100644 --- a/specification/apicenter/ApiCenter.Management/tspconfig.yaml +++ b/specification/apicenter/ApiCenter.Management/tspconfig.yaml @@ -5,8 +5,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/apicenter.json" use-read-only-status-schema: true linter: diff --git a/specification/appcomplianceautomation/AppComplianceAutomation.Management/tspconfig.yaml b/specification/appcomplianceautomation/AppComplianceAutomation.Management/tspconfig.yaml index eb95a6c369f6..1359c4429a69 100644 --- a/specification/appcomplianceautomation/AppComplianceAutomation.Management/tspconfig.yaml +++ b/specification/appcomplianceautomation/AppComplianceAutomation.Management/tspconfig.yaml @@ -11,8 +11,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/appcomplianceautomation.json" "@azure-tools/typespec-ts": experimental-extensible-enums: true diff --git a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/AppConfiguration/tspconfig.yaml b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/AppConfiguration/tspconfig.yaml index b8e32252d05d..4a356f091b1a 100644 --- a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/AppConfiguration/tspconfig.yaml +++ b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/AppConfiguration/tspconfig.yaml @@ -15,7 +15,7 @@ options: emit-lro-options: "all" examples-dir: "{project-root}/examples" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - arm-resource-flattening: true + "@azure-tools/typespec-python": emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-appconfiguration" namespace: "azure.mgmt.appconfiguration" diff --git a/specification/azuredependencymap/DependencyMap.Management/back-compatible.tsp b/specification/azuredependencymap/DependencyMap.Management/back-compatible.tsp new file mode 100644 index 000000000000..ae4d3ff00c0f --- /dev/null +++ b/specification/azuredependencymap/DependencyMap.Management/back-compatible.tsp @@ -0,0 +1,11 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Microsoft.DependencyMap; + +// Discriminated type +// @@Azure.ClientGenerator.Core.Legacy.flattenProperty(DiscoverySourceResource.properties, +// "autorest" +// ); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(MapsResource.properties, + "autorest" +); diff --git a/specification/azuredependencymap/DependencyMap.Management/main.tsp b/specification/azuredependencymap/DependencyMap.Management/main.tsp index 2b8e406d0682..d965721f7900 100644 --- a/specification/azuredependencymap/DependencyMap.Management/main.tsp +++ b/specification/azuredependencymap/DependencyMap.Management/main.tsp @@ -3,10 +3,11 @@ import "@typespec/versioning"; import "@azure-tools/typespec-autorest"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; + import "./models.tsp"; import "./resources.tsp"; import "./routes.tsp"; -//import "@azure-tools/typespec-providerhub"; +import "./back-compatible.tsp"; using TypeSpec.Versioning; using Azure.ResourceManager; diff --git a/specification/azuredependencymap/DependencyMap.Management/tspconfig.yaml b/specification/azuredependencymap/DependencyMap.Management/tspconfig.yaml index b933d5a9330a..5ce02742bbba 100644 --- a/specification/azuredependencymap/DependencyMap.Management/tspconfig.yaml +++ b/specification/azuredependencymap/DependencyMap.Management/tspconfig.yaml @@ -9,7 +9,7 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/dependencyMap.json" - arm-resource-flattening: true + version-enum-strategy: true emit-lro-options: "all" "@azure-typespec/http-client-csharp-mgmt": diff --git a/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-01-31-preview/dependencyMap.json b/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-01-31-preview/dependencyMap.json index e2ffd8f4e190..504dcb2d3f2f 100644 --- a/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-01-31-preview/dependencyMap.json +++ b/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-01-31-preview/dependencyMap.json @@ -1082,8 +1082,7 @@ "properties": { "properties": { "$ref": "#/definitions/DiscoverySourceResourceProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-05-01-preview/dependencyMap.json b/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-05-01-preview/dependencyMap.json index a01ce7def2e5..58f44e247695 100644 --- a/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-05-01-preview/dependencyMap.json +++ b/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-05-01-preview/dependencyMap.json @@ -1082,8 +1082,7 @@ "properties": { "properties": { "$ref": "#/definitions/DiscoverySourceResourceProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-07-01-preview/dependencyMap.json b/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-07-01-preview/dependencyMap.json index 292c6c9f89d9..559d6db78167 100644 --- a/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-07-01-preview/dependencyMap.json +++ b/specification/azuredependencymap/resource-manager/Microsoft.DependencyMap/preview/2025-07-01-preview/dependencyMap.json @@ -1171,8 +1171,7 @@ "properties": { "properties": { "$ref": "#/definitions/DiscoverySourceResourceProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/back-compatible.tsp b/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/back-compatible.tsp new file mode 100644 index 000000000000..4c528053c575 --- /dev/null +++ b/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/back-compatible.tsp @@ -0,0 +1,7 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Microsoft.AzureFleet; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Fleet.properties, + "autorest" +); diff --git a/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/main.tsp b/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/main.tsp index 703030d7284d..0c43c06cc9ee 100644 --- a/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/main.tsp +++ b/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/main.tsp @@ -8,6 +8,7 @@ import "./fleet.tsp"; import "./baseVirtualMachineProfile.tsp"; import "./virtualMachineScaleSet.tsp"; import "./virtualMachine.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Http; using TypeSpec.Rest; diff --git a/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/tspconfig.yaml b/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/tspconfig.yaml index d1eb45f91e53..76db8bce0e3c 100644 --- a/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/tspconfig.yaml +++ b/specification/azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/tspconfig.yaml @@ -14,8 +14,6 @@ options: emitter-output-dir: "{project-root}" azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{version-status}/{version}/azurefleet.json" arm-types-dir: "{project-root}/../../../../common-types/resource-management" "@azure-tools/typespec-csharp": diff --git a/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/back-compatible.tsp b/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/back-compatible.tsp new file mode 100644 index 000000000000..18f35dedd1ad --- /dev/null +++ b/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/back-compatible.tsp @@ -0,0 +1,11 @@ +// Contains overrides to make the Autorest Swagger2.0 back compatible + +using Microsoft.AzureLargeInstance; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AzureLargeInstance.properties, + "autorest" +); + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AzureLargeStorageInstance.properties, + "autorest" +); diff --git a/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/main.tsp b/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/main.tsp index d1705de12052..7871cfefc5b8 100644 --- a/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/main.tsp +++ b/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/main.tsp @@ -5,6 +5,7 @@ import "@azure-tools/typespec-azure-resource-manager"; import "./models.tsp"; import "./AzureLargeInstance.tsp"; import "./AzureLargeStorageInstance.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Rest; using TypeSpec.Http; diff --git a/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/tspconfig.yaml b/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/tspconfig.yaml index bde6d5b7dbe5..d74722635a74 100644 --- a/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/tspconfig.yaml +++ b/specification/azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/tspconfig.yaml @@ -8,7 +8,5 @@ options: emitter-output-dir: "{project-root}" azure-resource-provider-folder: "resource-manager" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{version-status}/{version}/azurelargeinstance.json" use-read-only-status-schema: true diff --git a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/back-compatible.tsp b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/back-compatible.tsp new file mode 100644 index 000000000000..2b7d7ac43664 --- /dev/null +++ b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/back-compatible.tsp @@ -0,0 +1,40 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Microsoft.AzureStackHCI; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AttestationStatus.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(GalleryImage.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(GuestAgent.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(HybridIdentityMetadata.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(LogicalNetwork.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(MarketplaceGalleryImage.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(NetworkInterface.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(NetworkSecurityGroup.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SecurityRule.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(StorageContainer.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualHardDisk.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachineInstance.properties, + "autorest" +); diff --git a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/main.tsp b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/main.tsp index e9e6211fc26a..890b3c5e51b4 100644 --- a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/main.tsp +++ b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/main.tsp @@ -16,6 +16,8 @@ import "./VirtualMachineInstance.tsp"; import "./HybridIdentityMetadata.tsp"; import "./AttestationStatus.tsp"; import "./GuestAgent.tsp"; +import "./back-compatible.tsp"; + using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; diff --git a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/tspconfig.yaml b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/tspconfig.yaml index 7898fe67f3b2..69f3a9f10b63 100644 --- a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/tspconfig.yaml +++ b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/tspconfig.yaml @@ -9,8 +9,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/StackHCIVM/{version-status}/{version}/stackhcivm.json" "@azure-tools/typespec-python": service-dir: "sdk/azurestackhci" diff --git a/specification/azurestackhci/Operations.Management/tspconfig.yaml b/specification/azurestackhci/Operations.Management/tspconfig.yaml index ce55d803eae4..4a8f1edff056 100644 --- a/specification/azurestackhci/Operations.Management/tspconfig.yaml +++ b/specification/azurestackhci/Operations.Management/tspconfig.yaml @@ -6,8 +6,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/operations/{version-status}/{version}/operations.json" linter: extends: diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/Cdn/tspconfig.yaml b/specification/cdn/resource-manager/Microsoft.Cdn/Cdn/tspconfig.yaml index abd4b42fc827..6ccb07caca4f 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/Cdn/tspconfig.yaml +++ b/specification/cdn/resource-manager/Microsoft.Cdn/Cdn/tspconfig.yaml @@ -11,7 +11,7 @@ options: output-file: "{version-status}/{version}/openapi.json" examples-dir: "{project-root}/examples" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - arm-resource-flattening: true + emit-lro-options: "all" "@azure-tools/typespec-python": emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-cdn" diff --git a/specification/chaos/resource-manager/Microsoft.Chaos/Chaos/back-compatible.tsp b/specification/chaos/resource-manager/Microsoft.Chaos/Chaos/back-compatible.tsp index 2a912c128d1f..22ae0c8e3f99 100644 --- a/specification/chaos/resource-manager/Microsoft.Chaos/Chaos/back-compatible.tsp +++ b/specification/chaos/resource-manager/Microsoft.Chaos/Chaos/back-compatible.tsp @@ -34,3 +34,29 @@ using Microsoft.Chaos; @@clientName(Operations.list, "ListAll", "autorest"); @@clientName(ExperimentExecutions.getExecutionDetails, "ExecutionDetails"); @@clientName(PrivateAccesses.privateLinkResources, "GetPrivateLinkResources"); + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Capability.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CapabilityType.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExperimentExecution.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateAccess.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateEndpointConnection.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateLinkResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Target.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(TargetType.properties, + "autorest" +); diff --git a/specification/chaos/resource-manager/Microsoft.Chaos/Chaos/tspconfig.yaml b/specification/chaos/resource-manager/Microsoft.Chaos/Chaos/tspconfig.yaml index a8f34b1a28e5..726869a93e27 100644 --- a/specification/chaos/resource-manager/Microsoft.Chaos/Chaos/tspconfig.yaml +++ b/specification/chaos/resource-manager/Microsoft.Chaos/Chaos/tspconfig.yaml @@ -7,8 +7,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}" output-file: "{version-status}/{version}/openapi.json" arm-types-dir: "{project-root}/../../../../common-types/resource-management" diff --git a/specification/codesigning/CodeSigning.Management/tspconfig.yaml b/specification/codesigning/CodeSigning.Management/tspconfig.yaml index 1fedabe0c242..99e241e2f602 100644 --- a/specification/codesigning/CodeSigning.Management/tspconfig.yaml +++ b/specification/codesigning/CodeSigning.Management/tspconfig.yaml @@ -9,8 +9,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/codeSigningAccount.json" "@azure-tools/typespec-java": emitter-output-dir: "{output-dir}/{service-dir}/azure-resourcemanager-trustedsigning" diff --git a/specification/communitytraining/Community.Management/back-compatible.tsp b/specification/communitytraining/Community.Management/back-compatible.tsp new file mode 100644 index 000000000000..cd6079a788c6 --- /dev/null +++ b/specification/communitytraining/Community.Management/back-compatible.tsp @@ -0,0 +1,10 @@ +// Contains overrides to make the Autorest Swagger2.0 back compatible +using Microsoft.Community; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CommunityTraining.properties, + "autorest" +); +// For CommunityTrainingUpdate +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/communitytraining/Community.Management/main.tsp b/specification/communitytraining/Community.Management/main.tsp index 604d8d2593de..796b77a262a1 100644 --- a/specification/communitytraining/Community.Management/main.tsp +++ b/specification/communitytraining/Community.Management/main.tsp @@ -3,6 +3,9 @@ import "@typespec/rest"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@azure-tools/typespec-client-generator-core"; + +import "./back-compatible.tsp"; using TypeSpec.Http; using TypeSpec.Rest; diff --git a/specification/communitytraining/Community.Management/tspconfig.yaml b/specification/communitytraining/Community.Management/tspconfig.yaml index c40e38aca037..f287fca1a0a7 100644 --- a/specification/communitytraining/Community.Management/tspconfig.yaml +++ b/specification/communitytraining/Community.Management/tspconfig.yaml @@ -5,8 +5,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/CommunityTrainings.json" linter: extends: diff --git a/specification/compute/Compute.Management/tspconfig.yaml b/specification/compute/Compute.Management/tspconfig.yaml index 29132d66a0f1..5f3f461430ac 100644 --- a/specification/compute/Compute.Management/tspconfig.yaml +++ b/specification/compute/Compute.Management/tspconfig.yaml @@ -6,7 +6,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/ComputeRP/{version-status}/{version}/ComputeRP.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + linter: extends: - "@azure-tools/typespec-azure-rulesets/resource-manager" diff --git a/specification/compute/Disk.Management/tspconfig.yaml b/specification/compute/Disk.Management/tspconfig.yaml index 989ecae23d56..3cc36470ac7b 100644 --- a/specification/compute/Disk.Management/tspconfig.yaml +++ b/specification/compute/Disk.Management/tspconfig.yaml @@ -7,7 +7,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/DiskRP/{version-status}/{version}/DiskRP.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + linter: extends: - "@azure-tools/typespec-azure-rulesets/resource-manager" diff --git a/specification/compute/Sku.Management/tspconfig.yaml b/specification/compute/Sku.Management/tspconfig.yaml index 1fc89e7eb1c9..fd90aa8138b7 100644 --- a/specification/compute/Sku.Management/tspconfig.yaml +++ b/specification/compute/Sku.Management/tspconfig.yaml @@ -8,7 +8,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/Skus/{version-status}/{version}/skus.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + linter: extends: - "@azure-tools/typespec-azure-rulesets/resource-manager" diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/Consumption/tspconfig.yaml b/specification/consumption/resource-manager/Microsoft.Consumption/Consumption/tspconfig.yaml index 4160218e5e53..c6b31695af39 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/Consumption/tspconfig.yaml +++ b/specification/consumption/resource-manager/Microsoft.Consumption/Consumption/tspconfig.yaml @@ -10,7 +10,7 @@ options: output-file: "{version-status}/{version}/openapi.json" emit-lro-options: "all" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + arm-types-dir: "{project-root}/../../../../common-types/resource-management" "@azure-tools/typespec-python": emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-consumption" diff --git a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/back-compatible.tsp b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/back-compatible.tsp index ddd860dc5bde..e3b45719d262 100644 --- a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/back-compatible.tsp +++ b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/back-compatible.tsp @@ -3,7 +3,49 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.ContainerRegistry; -// Remove deprecated @flattenProperty decorators since they're handled by @Azure.ClientGenerator.Core.Legacy.flattenProperty in models.tsp +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Archive.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ArchiveVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CacheRule.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ConnectedRegistry.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CredentialSet.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExportPipeline.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ImportPipeline.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PipelineRun.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateEndpointConnection.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Registry.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Replication.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ScopeMap.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Token.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Webhook.properties, + "autorest" +); @@clientName(IPRule.value, "IPAddressOrRange"); diff --git a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml index 8a6b2c53d252..d3b0e9a211de 100644 --- a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml +++ b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/tspconfig.yaml @@ -10,7 +10,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{version-status}/{version}/containerregistry.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + arm-types-dir: "{project-root}/../../../../common-types/resource-management" emit-lro-options: "all" "@azure-tools/typespec-csharp": diff --git a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/back-compatible.tsp b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/back-compatible.tsp index 2bab9394d8a0..d4aa79867d5d 100644 --- a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/back-compatible.tsp +++ b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/back-compatible.tsp @@ -3,6 +3,18 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.ContainerRegistry; +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AgentPool.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Run.properties, "autorest"); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Task.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(TaskRun.properties, + "autorest" +); + @@clientName(AgentPools.create::parameters.resource, "agentPool"); @@clientName(AgentPools.update::parameters.properties, "updateParameters"); diff --git a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/tspconfig.yaml b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/tspconfig.yaml index 96d8eca5f811..180ff2f54cb8 100644 --- a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/tspconfig.yaml +++ b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/tspconfig.yaml @@ -10,7 +10,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{version-status}/{version}/containerregistry_build.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + arm-types-dir: "{project-root}/../../../../common-types/resource-management" emit-lro-options: "all" "@azure-tools/typespec-csharp": diff --git a/specification/containerservice/DeploymentSafeguards.Management/back-compatible.tsp b/specification/containerservice/DeploymentSafeguards.Management/back-compatible.tsp new file mode 100644 index 000000000000..b125568288a3 --- /dev/null +++ b/specification/containerservice/DeploymentSafeguards.Management/back-compatible.tsp @@ -0,0 +1,11 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Azure.ResourceManager; + +using Microsoft.ContainerService; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DeploymentSafeguard.properties, + "autorest" +); diff --git a/specification/containerservice/DeploymentSafeguards.Management/main.tsp b/specification/containerservice/DeploymentSafeguards.Management/main.tsp index e85e4b4dce81..a71716112f2c 100644 --- a/specification/containerservice/DeploymentSafeguards.Management/main.tsp +++ b/specification/containerservice/DeploymentSafeguards.Management/main.tsp @@ -1,6 +1,7 @@ import "@typespec/versioning"; import "@azure-tools/typespec-azure-resource-manager"; import "./deploymentsafeguards.tsp"; +import "./back-compatible.tsp"; using Azure.ResourceManager; using TypeSpec.Http; diff --git a/specification/containerservice/DeploymentSafeguards.Management/tspconfig.yaml b/specification/containerservice/DeploymentSafeguards.Management/tspconfig.yaml index 553e8f1f6337..5d13c6edeac3 100644 --- a/specification/containerservice/DeploymentSafeguards.Management/tspconfig.yaml +++ b/specification/containerservice/DeploymentSafeguards.Management/tspconfig.yaml @@ -12,8 +12,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}/.." arm-types-dir: "{project-root}/../../common-types/resource-management" output-file: "{azure-resource-provider-folder}/{service-name}/deploymentsafeguards/{version-status}/{version}/deploymentsafeguards.json" diff --git a/specification/containerservice/Fleet.Management/back-compatible.tsp b/specification/containerservice/Fleet.Management/back-compatible.tsp new file mode 100644 index 000000000000..4c4398c6b9b8 --- /dev/null +++ b/specification/containerservice/Fleet.Management/back-compatible.tsp @@ -0,0 +1,29 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Azure.ResourceManager; + +using Microsoft.ContainerService; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Fleet.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(FleetMember.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Gate.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(UpdateRun.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(FleetUpdateStrategy.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AutoUpgradeProfile.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/containerservice/Fleet.Management/main.tsp b/specification/containerservice/Fleet.Management/main.tsp index cfa045fe32c2..9137d48b84a3 100644 --- a/specification/containerservice/Fleet.Management/main.tsp +++ b/specification/containerservice/Fleet.Management/main.tsp @@ -7,6 +7,7 @@ import "./update/common.tsp"; import "./update/run.tsp"; import "./update/strategy.tsp"; import "./update/autoupgradeprofile.tsp"; +import "./back-compatible.tsp"; using Azure.ResourceManager; using TypeSpec.Http; diff --git a/specification/containerservice/Fleet.Management/tspconfig.yaml b/specification/containerservice/Fleet.Management/tspconfig.yaml index 32bb0c8745f0..4e3aa5645578 100644 --- a/specification/containerservice/Fleet.Management/tspconfig.yaml +++ b/specification/containerservice/Fleet.Management/tspconfig.yaml @@ -12,8 +12,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}/.." arm-types-dir: "{project-root}/../../common-types/resource-management" output-file: "{azure-resource-provider-folder}/{service-name}/fleet/{version-status}/{version}/fleets.json" diff --git a/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/back-compatible.tsp b/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/back-compatible.tsp new file mode 100644 index 000000000000..0c32c2c90683 --- /dev/null +++ b/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/back-compatible.tsp @@ -0,0 +1,15 @@ +// Contains overrides to make the Autorest Swagger2.0 back compatible +using Microsoft.ContainerStorage; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Pool.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Snapshot.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Volume.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/main.tsp b/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/main.tsp index 6c7bdf42e3d0..6f39cf1240f6 100644 --- a/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/main.tsp +++ b/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/main.tsp @@ -2,10 +2,13 @@ import "@typespec/rest"; import "@typespec/openapi"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-resource-manager"; +import "@azure-tools/typespec-client-generator-core"; + import "./pool.tsp"; import "./volume.tsp"; import "./snapshot.tsp"; import "./assignment.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Versioning; using Azure.ResourceManager; diff --git a/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/tspconfig.yaml b/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/tspconfig.yaml index 09a2f802286f..9dd5de4904bd 100644 --- a/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/tspconfig.yaml +++ b/specification/containerstorage/resource-manager/Microsoft.ContainerStorage/ContainerStorage/tspconfig.yaml @@ -9,8 +9,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}" output-file: "{version-status}/{version}/containerstorage.json" arm-types-dir: "{project-root}/../../../../common-types/resource-management" diff --git a/specification/databasewatcher/DatabaseWatcher.Management/back-compatible.tsp b/specification/databasewatcher/DatabaseWatcher.Management/back-compatible.tsp new file mode 100644 index 000000000000..67f28d625d6c --- /dev/null +++ b/specification/databasewatcher/DatabaseWatcher.Management/back-compatible.tsp @@ -0,0 +1,20 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Microsoft.DatabaseWatcher; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AlertRuleResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(HealthValidation.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SharedPrivateLinkResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Watcher.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/databasewatcher/DatabaseWatcher.Management/main.tsp b/specification/databasewatcher/DatabaseWatcher.Management/main.tsp index 083c26850272..2d626f4a7b66 100644 --- a/specification/databasewatcher/DatabaseWatcher.Management/main.tsp +++ b/specification/databasewatcher/DatabaseWatcher.Management/main.tsp @@ -1 +1,2 @@ import "./watcher.tsp"; +import "./back-compatible.tsp"; diff --git a/specification/databasewatcher/DatabaseWatcher.Management/tspconfig.yaml b/specification/databasewatcher/DatabaseWatcher.Management/tspconfig.yaml index c1c5143879ab..2f831e123c23 100644 --- a/specification/databasewatcher/DatabaseWatcher.Management/tspconfig.yaml +++ b/specification/databasewatcher/DatabaseWatcher.Management/tspconfig.yaml @@ -8,8 +8,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/Watcher.json" use-read-only-status-schema: true "@azure-tools/typespec-csharp": diff --git a/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2023-09-01-preview/Watcher.json b/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2023-09-01-preview/Watcher.json index 5cb75181e47a..4d2e39761a3d 100644 --- a/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2023-09-01-preview/Watcher.json +++ b/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2023-09-01-preview/Watcher.json @@ -1481,8 +1481,7 @@ "properties": { "properties": { "$ref": "#/definitions/TargetProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2024-07-19-preview/Watcher.json b/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2024-07-19-preview/Watcher.json index 0627929916cd..bf4d004ac74a 100644 --- a/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2024-07-19-preview/Watcher.json +++ b/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2024-07-19-preview/Watcher.json @@ -1797,8 +1797,7 @@ "properties": { "properties": { "$ref": "#/definitions/TargetProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2024-10-01-preview/Watcher.json b/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2024-10-01-preview/Watcher.json index 53e2b4266bb5..c8aac4ea9826 100644 --- a/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2024-10-01-preview/Watcher.json +++ b/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/preview/2024-10-01-preview/Watcher.json @@ -2058,8 +2058,7 @@ "properties": { "properties": { "$ref": "#/definitions/TargetProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/stable/2025-01-02/Watcher.json b/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/stable/2025-01-02/Watcher.json index b4b8802783c6..3da971cf7ba8 100644 --- a/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/stable/2025-01-02/Watcher.json +++ b/specification/databasewatcher/resource-manager/Microsoft.DatabaseWatcher/stable/2025-01-02/Watcher.json @@ -2021,8 +2021,7 @@ "properties": { "properties": { "$ref": "#/definitions/TargetProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/databox/resource-manager/Microsoft.DataBox/DataBox/tspconfig.yaml b/specification/databox/resource-manager/Microsoft.DataBox/DataBox/tspconfig.yaml index 461c71224d77..6dded3b503c2 100644 --- a/specification/databox/resource-manager/Microsoft.DataBox/DataBox/tspconfig.yaml +++ b/specification/databox/resource-manager/Microsoft.DataBox/DataBox/tspconfig.yaml @@ -11,7 +11,7 @@ options: output-file: "{version-status}/{version}/databox.json" examples-dir: "{project-root}/examples" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - arm-resource-flattening: true + emit-lro-options: "all" "@azure-tools/typespec-csharp": flavor: azure diff --git a/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/DesktopVirtualization/back-compat.tsp b/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/DesktopVirtualization/back-compat.tsp index b9c97075e68e..5ef750e7034f 100644 --- a/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/DesktopVirtualization/back-compat.tsp +++ b/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/DesktopVirtualization/back-compat.tsp @@ -64,3 +64,52 @@ using Microsoft.DesktopVirtualization; ); @@clientName(MSIXImages, "MsixImages", "autorest"); + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ActiveSessionHostConfiguration.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ApplicationGroup.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AppAttachPackage.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Application.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Desktop.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(HostPool.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(MSIXPackage.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Workspace.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateEndpointConnectionWithSystemData.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ScalingPlanPersonalSchedule.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ScalingPlan.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ScalingPlanPooledSchedule.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SessionHost.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SessionHostConfiguration.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SessionHostManagement.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(UserSession.properties, + "autorest" +); diff --git a/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/DesktopVirtualization/tspconfig.yaml b/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/DesktopVirtualization/tspconfig.yaml index a5a327f5579a..3ed686b0093c 100644 --- a/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/DesktopVirtualization/tspconfig.yaml +++ b/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/DesktopVirtualization/tspconfig.yaml @@ -8,7 +8,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{version-status}/{version}/desktopvirtualization.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + arm-types-dir: "{project-root}/../../../../common-types/resource-management" linter: extends: diff --git a/specification/devcenter/DevCenter.Management/back-compatible.tsp b/specification/devcenter/DevCenter.Management/back-compatible.tsp index 718916f3f2a9..7bf8bd8ae487 100644 --- a/specification/devcenter/DevCenter.Management/back-compatible.tsp +++ b/specification/devcenter/DevCenter.Management/back-compatible.tsp @@ -166,3 +166,68 @@ using Microsoft.DevCenter; "IdentityType", "python,javascript" ); + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AllowedEnvironmentType.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AttachedNetworkConnection.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Catalog.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CustomizationTask.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DevBoxDefinition.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DevCenterEncryptionSet.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DevCenter.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(EnvironmentDefinition.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(EnvironmentType.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Gallery.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(HealthCheckStatusDetails.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ImageDefinitionBuild.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ImageDefinition.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Image.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ImageVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(NetworkConnection.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Pool.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ProjectEnvironmentType.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ProjectPolicy.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Project.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Schedule.properties, + "autorest" +); diff --git a/specification/devcenter/DevCenter.Management/tspconfig.yaml b/specification/devcenter/DevCenter.Management/tspconfig.yaml index 5d0b8104aa16..f077b62a5fde 100644 --- a/specification/devcenter/DevCenter.Management/tspconfig.yaml +++ b/specification/devcenter/DevCenter.Management/tspconfig.yaml @@ -11,7 +11,7 @@ options: output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/DevCenterRP.json" emit-lro-options: "all" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + use-read-only-status-schema: true "@azure-tools/typespec-csharp": namespace: "Azure.ResourceManager.DevCenter" diff --git a/specification/deviceregistry/DeviceRegistry.Management/back-compatible.tsp b/specification/deviceregistry/DeviceRegistry.Management/back-compatible.tsp new file mode 100644 index 000000000000..ef415fbcd328 --- /dev/null +++ b/specification/deviceregistry/DeviceRegistry.Management/back-compatible.tsp @@ -0,0 +1,56 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Azure.ResourceManager; + +using Microsoft.DeviceRegistry; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AssetEndpointProfile.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Asset.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(BillingContainer.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Credential.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DiscoveredAssetEndpointProfile.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DiscoveredAsset.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(NamespaceAsset.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(NamespaceDevice.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(NamespaceDiscoveredAsset.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(NamespaceDiscoveredDevice.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Namespace.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Policy.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Schema.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SchemaRegistry.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SchemaVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/deviceregistry/DeviceRegistry.Management/main.tsp b/specification/deviceregistry/DeviceRegistry.Management/main.tsp index 1e83b95cd3da..1d13624ba71c 100644 --- a/specification/deviceregistry/DeviceRegistry.Management/main.tsp +++ b/specification/deviceregistry/DeviceRegistry.Management/main.tsp @@ -9,6 +9,7 @@ import "./discoveredAssets.tsp"; import "./discoveredAssetEndpointProfiles.tsp"; import "./namespaces.tsp"; import "./ns_credential.tsp"; +import "./back-compatible.tsp"; import "./ns_policy.tsp"; import "./ns_assets.tsp"; import "./ns_devices.tsp"; diff --git a/specification/deviceregistry/DeviceRegistry.Management/tspconfig.yaml b/specification/deviceregistry/DeviceRegistry.Management/tspconfig.yaml index 3900d668ab85..3d1d54d191ab 100644 --- a/specification/deviceregistry/DeviceRegistry.Management/tspconfig.yaml +++ b/specification/deviceregistry/DeviceRegistry.Management/tspconfig.yaml @@ -8,8 +8,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/deviceregistry.json" use-read-only-status-schema: true omit-unreachable-types: true diff --git a/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/back-compatible.tsp b/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/back-compatible.tsp new file mode 100644 index 000000000000..abc153ee3f3e --- /dev/null +++ b/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/back-compatible.tsp @@ -0,0 +1,21 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Microsoft.DevOpsInfrastructure; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ImageVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Pool.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ResourceDetailsObject.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Microsoft.DevOpsInfrastructure.ResourceSku.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/main.tsp b/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/main.tsp index 6aa724bdd8da..e89fb150c8de 100644 --- a/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/main.tsp +++ b/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/main.tsp @@ -1,4 +1,5 @@ import "@typespec/http"; +import "./back-compatible.tsp"; import "@typespec/openapi"; import "@typespec/rest"; import "@azure-tools/typespec-azure-core"; diff --git a/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/tspconfig.yaml b/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/tspconfig.yaml index 4bcd3f3da22c..c5e4b9dbebc1 100644 --- a/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/tspconfig.yaml +++ b/specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management/tspconfig.yaml @@ -13,8 +13,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/devopsinfrastructure.json" omit-unreachable-types: true "@azure-tools/typespec-python": diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/tspconfig.yaml b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/tspconfig.yaml index 1d51afc81520..bf1f407e52ab 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/tspconfig.yaml +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/DevTestLabs/tspconfig.yaml @@ -10,7 +10,7 @@ options: output-file: "{version-status}/{version}/DTL.json" azure-resource-provider-folder: "resource-manager" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + arm-types-dir: "{project-root}/../../../../common-types/resource-management" "@azure-tools/typespec-csharp": flavor: azure diff --git a/specification/dnsresolver/resource-manager/Microsoft.Network/DnsResolver/tspconfig.yaml b/specification/dnsresolver/resource-manager/Microsoft.Network/DnsResolver/tspconfig.yaml index 6fabaf95941e..a6d4469f6a0a 100644 --- a/specification/dnsresolver/resource-manager/Microsoft.Network/DnsResolver/tspconfig.yaml +++ b/specification/dnsresolver/resource-manager/Microsoft.Network/DnsResolver/tspconfig.yaml @@ -11,7 +11,7 @@ options: output-file: "{version-status}/{version}/openapi.json" examples-dir: "{project-root}/examples" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - arm-resource-flattening: true + emit-lro-options: "all" "@azure-tools/typespec-csharp": flavor: azure diff --git a/specification/edgezones/EdgeZones.Management/back-compatible.tsp b/specification/edgezones/EdgeZones.Management/back-compatible.tsp new file mode 100644 index 000000000000..c14274b0bd05 --- /dev/null +++ b/specification/edgezones/EdgeZones.Management/back-compatible.tsp @@ -0,0 +1,8 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Microsoft.EdgeZones; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExtendedZone.properties, + "autorest" +); diff --git a/specification/edgezones/EdgeZones.Management/main.tsp b/specification/edgezones/EdgeZones.Management/main.tsp index 58a482194d0a..8869d355dde2 100644 --- a/specification/edgezones/EdgeZones.Management/main.tsp +++ b/specification/edgezones/EdgeZones.Management/main.tsp @@ -1,4 +1,5 @@ import "@typespec/http"; +import "./back-compatible.tsp"; import "@typespec/rest"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; diff --git a/specification/edgezones/EdgeZones.Management/tspconfig.yaml b/specification/edgezones/EdgeZones.Management/tspconfig.yaml index faa2b335147e..849405f22630 100644 --- a/specification/edgezones/EdgeZones.Management/tspconfig.yaml +++ b/specification/edgezones/EdgeZones.Management/tspconfig.yaml @@ -10,8 +10,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/edgezones.json" diff --git a/specification/eventhub/resource-manager/Microsoft.EventHub/Eventhub/tspconfig.yaml b/specification/eventhub/resource-manager/Microsoft.EventHub/Eventhub/tspconfig.yaml index 539d60809b05..3d6b03a2ca1b 100644 --- a/specification/eventhub/resource-manager/Microsoft.EventHub/Eventhub/tspconfig.yaml +++ b/specification/eventhub/resource-manager/Microsoft.EventHub/Eventhub/tspconfig.yaml @@ -12,7 +12,7 @@ options: arm-types-dir: "{project-root}/../../../../common-types/resource-management" emit-lro-options: "all" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + "@azure-tools/typespec-csharp": emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" flavor: azure diff --git a/specification/ews/SecretSyncController.Management/back-compatible.tsp b/specification/ews/SecretSyncController.Management/back-compatible.tsp new file mode 100644 index 000000000000..9001e9e3a96f --- /dev/null +++ b/specification/ews/SecretSyncController.Management/back-compatible.tsp @@ -0,0 +1,15 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Microsoft.SecretSyncController; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AzureKeyVaultSecretProviderClass.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SecretSync.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/ews/SecretSyncController.Management/main.tsp b/specification/ews/SecretSyncController.Management/main.tsp index f9697a330b5d..a49d30d5ccb4 100644 --- a/specification/ews/SecretSyncController.Management/main.tsp +++ b/specification/ews/SecretSyncController.Management/main.tsp @@ -1,4 +1,5 @@ import "@typespec/http"; +import "./back-compatible.tsp"; import "@typespec/rest"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; diff --git a/specification/ews/SecretSyncController.Management/tspconfig.yaml b/specification/ews/SecretSyncController.Management/tspconfig.yaml index 7e09d3d4f8f9..0f393756a179 100644 --- a/specification/ews/SecretSyncController.Management/tspconfig.yaml +++ b/specification/ews/SecretSyncController.Management/tspconfig.yaml @@ -10,8 +10,6 @@ options: output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/secretsynccontroller.json" use-read-only-status-schema: true emit-common-types-schema: never - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true "@azure-tools/typespec-csharp": flavor: azure clear-output-folder: true diff --git a/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/back-compatible.tsp b/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/back-compatible.tsp new file mode 100644 index 000000000000..6b4fbe14a248 --- /dev/null +++ b/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/back-compatible.tsp @@ -0,0 +1,14 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Azure.ResourceManager; + +using Microsoft.Fabric; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(FabricCapacity.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/main.tsp b/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/main.tsp index 20ce2d063bc5..346f6ac78795 100644 --- a/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/main.tsp +++ b/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/main.tsp @@ -4,6 +4,7 @@ import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; import "./capacity.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Versioning; using Azure.ResourceManager; diff --git a/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/tspconfig.yaml b/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/tspconfig.yaml index 85cabbeb7659..554f3065a2d7 100644 --- a/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/tspconfig.yaml +++ b/specification/fabric/resource-manager/Microsoft.Fabric/Fabric/tspconfig.yaml @@ -10,8 +10,6 @@ options: azure-resource-provider-folder: "resource-manager" arm-types-dir: "{project-root}/../../../../common-types/resource-management" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{version-status}/{version}/fabric.json" "@azure-tools/typespec-csharp": emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" diff --git a/specification/hybridconnectivity/HybridConnectivity.Management/back-compatible.tsp b/specification/hybridconnectivity/HybridConnectivity.Management/back-compatible.tsp new file mode 100644 index 000000000000..02cb9fb90f2d --- /dev/null +++ b/specification/hybridconnectivity/HybridConnectivity.Management/back-compatible.tsp @@ -0,0 +1,13 @@ +import "@azure-tools/typespec-client-generator-core"; + +import "./main.tsp"; + +using Azure.ClientGenerator.Core; +using Microsoft.HybridConnectivity; + +@@Legacy.flattenProperty(EndpointResource.properties, "autorest"); +@@Legacy.flattenProperty(InventoryResource.properties, "autorest"); +@@Legacy.flattenProperty(PublicCloudConnector.properties, "autorest"); +@@Legacy.flattenProperty(ServiceConfigurationResource.properties, "autorest"); +@@Legacy.flattenProperty(SolutionConfiguration.properties, "autorest"); +@@Legacy.flattenProperty(SolutionTypeResource.properties, "autorest"); diff --git a/specification/hybridconnectivity/HybridConnectivity.Management/main.tsp b/specification/hybridconnectivity/HybridConnectivity.Management/main.tsp index 6f4791a3e722..32a131f5bdbb 100644 --- a/specification/hybridconnectivity/HybridConnectivity.Management/main.tsp +++ b/specification/hybridconnectivity/HybridConnectivity.Management/main.tsp @@ -13,6 +13,7 @@ import "./EndpointResource.tsp"; import "./ServiceConfigurationResource.tsp"; import "./PublicCloud.tsp"; import "@azure-tools/typespec-client-generator-core"; +import "./back-compatible.tsp"; using Azure.ClientGenerator.Core; using TypeSpec.Rest; diff --git a/specification/hybridconnectivity/HybridConnectivity.Management/tspconfig.yaml b/specification/hybridconnectivity/HybridConnectivity.Management/tspconfig.yaml index 50fffa34ca80..727608823696 100644 --- a/specification/hybridconnectivity/HybridConnectivity.Management/tspconfig.yaml +++ b/specification/hybridconnectivity/HybridConnectivity.Management/tspconfig.yaml @@ -14,7 +14,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/hybridconnectivity.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + "@azure-tools/typespec-csharp": emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" flavor: "azure" diff --git a/specification/informatica/Informatica.DataManagement.Management/back-compatible.tsp b/specification/informatica/Informatica.DataManagement.Management/back-compatible.tsp new file mode 100644 index 000000000000..6751d52a3cae --- /dev/null +++ b/specification/informatica/Informatica.DataManagement.Management/back-compatible.tsp @@ -0,0 +1,13 @@ +import "@azure-tools/typespec-client-generator-core"; + +import "./main.tsp"; + +using Azure.ClientGenerator.Core; +using Informatica.DataManagement; + +@@Legacy.flattenProperty(InformaticaOrganizationResource.properties, + "autorest" +); +@@Legacy.flattenProperty(InformaticaServerlessRuntimeResource.properties, + "autorest" +); diff --git a/specification/informatica/Informatica.DataManagement.Management/main.tsp b/specification/informatica/Informatica.DataManagement.Management/main.tsp index 170c923f58fc..ef8c2f3f9653 100644 --- a/specification/informatica/Informatica.DataManagement.Management/main.tsp +++ b/specification/informatica/Informatica.DataManagement.Management/main.tsp @@ -1,4 +1,6 @@ import "@typespec/rest"; +import "./back-compatible.tsp"; + import "@typespec/openapi"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; diff --git a/specification/informatica/Informatica.DataManagement.Management/tspconfig.yaml b/specification/informatica/Informatica.DataManagement.Management/tspconfig.yaml index 8b97fa774d4e..380df64ba4e7 100644 --- a/specification/informatica/Informatica.DataManagement.Management/tspconfig.yaml +++ b/specification/informatica/Informatica.DataManagement.Management/tspconfig.yaml @@ -8,8 +8,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" "@azure-tools/typespec-python": emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-informaticadatamanagement" diff --git a/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/back-compatible.tsp b/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/back-compatible.tsp new file mode 100644 index 000000000000..6f830b2867ba --- /dev/null +++ b/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/back-compatible.tsp @@ -0,0 +1,14 @@ +// Contains overrides to make the Autorest Swagger2.0 back compatible +using Microsoft.IoTOperationsDataProcessor; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Dataset.properties, + "autorest" +); + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Instance.properties, + "autorest" +); + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Pipeline.properties, + "autorest" +); diff --git a/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/main.tsp b/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/main.tsp index 785be082c9d4..516e459c0f5d 100644 --- a/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/main.tsp +++ b/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/main.tsp @@ -3,9 +3,12 @@ import "@typespec/rest"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@azure-tools/typespec-client-generator-core"; + import "./instance.tsp"; import "./pipeline.tsp"; import "./dataset.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Http; using TypeSpec.Rest; diff --git a/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/tspconfig.yaml b/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/tspconfig.yaml index bfb5a822f38a..a1d0663c5388 100644 --- a/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/tspconfig.yaml +++ b/specification/iotoperationsdataprocessor/IoTOperationsDataProcessor.Management/tspconfig.yaml @@ -5,8 +5,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" omit-unreachable-types: true linter: diff --git a/specification/iotoperationsmq/IoTOperationsMQ.Management/back-compatible.tsp b/specification/iotoperationsmq/IoTOperationsMQ.Management/back-compatible.tsp new file mode 100644 index 000000000000..3af43ada6886 --- /dev/null +++ b/specification/iotoperationsmq/IoTOperationsMQ.Management/back-compatible.tsp @@ -0,0 +1,43 @@ +// Contains overrides to make the Autorest Swagger2.0 back compatible +using Microsoft.IoTOperationsMQ; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(BrokerAuthenticationResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(BrokerAuthorizationResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(BrokerListenerResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(BrokerResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DataLakeConnectorResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DiagnosticServiceResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DataLakeTopicMapResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(KafkaConnectorResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(KafkaTopicMapResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(MqttBridgeConnectorResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(MqResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(MqttBridgeTopicMapResource.properties, + "autorest" +); + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/iotoperationsmq/IoTOperationsMQ.Management/main.tsp b/specification/iotoperationsmq/IoTOperationsMQ.Management/main.tsp index e2e594541441..b530d792f0e5 100644 --- a/specification/iotoperationsmq/IoTOperationsMQ.Management/main.tsp +++ b/specification/iotoperationsmq/IoTOperationsMQ.Management/main.tsp @@ -3,12 +3,14 @@ import "@typespec/rest"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@azure-tools/typespec-client-generator-core"; import "./models/datalakeconnector.tsp"; import "./models/diagnosticservice.tsp"; import "./models/mqttbroker.tsp"; import "./models/mqttbridgeconnector.tsp"; import "./models/kafkaconnector.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Http; using TypeSpec.Rest; diff --git a/specification/iotoperationsmq/IoTOperationsMQ.Management/tspconfig.yaml b/specification/iotoperationsmq/IoTOperationsMQ.Management/tspconfig.yaml index 054be2f00a65..01c9f345b126 100644 --- a/specification/iotoperationsmq/IoTOperationsMQ.Management/tspconfig.yaml +++ b/specification/iotoperationsmq/IoTOperationsMQ.Management/tspconfig.yaml @@ -5,8 +5,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/iotoperationsmq.json" linter: extends: diff --git a/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/back-compatible.tsp b/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/back-compatible.tsp new file mode 100644 index 000000000000..3a1514386476 --- /dev/null +++ b/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/back-compatible.tsp @@ -0,0 +1,12 @@ +// Contains overrides to make the Autorest Swagger2.0 back compatible +using Microsoft.IoTOperationsOrchestrator; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Instance.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Solution.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Target.properties, + "autorest" +); diff --git a/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/main.tsp b/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/main.tsp index 0ff065c5ebd5..7b98a3d1f6cb 100644 --- a/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/main.tsp +++ b/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/main.tsp @@ -3,9 +3,12 @@ import "@typespec/rest"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@azure-tools/typespec-client-generator-core"; + import "./instance.tsp"; import "./target.tsp"; import "./solution.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Http; using TypeSpec.Rest; diff --git a/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/tspconfig.yaml b/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/tspconfig.yaml index bfb5a822f38a..a1d0663c5388 100644 --- a/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/tspconfig.yaml +++ b/specification/iotoperationsorchestrator/IoTOperationsOrchestrator.Management/tspconfig.yaml @@ -5,8 +5,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" omit-unreachable-types: true linter: diff --git a/specification/kubernetesruntime/KubernetesRuntime.Management/back-compatible.tsp b/specification/kubernetesruntime/KubernetesRuntime.Management/back-compatible.tsp new file mode 100644 index 000000000000..7c7b8dc23fba --- /dev/null +++ b/specification/kubernetesruntime/KubernetesRuntime.Management/back-compatible.tsp @@ -0,0 +1,11 @@ +import "@azure-tools/typespec-client-generator-core"; + +import "./main.tsp"; + +using Azure.ClientGenerator.Core; +using Microsoft.KubernetesRuntime; + +@@Legacy.flattenProperty(BgpPeer.properties, "autorest"); +@@Legacy.flattenProperty(LoadBalancer.properties, "autorest"); +@@Legacy.flattenProperty(ServiceResource.properties, "autorest"); +@@Legacy.flattenProperty(StorageClassResource.properties, "autorest"); diff --git a/specification/kubernetesruntime/KubernetesRuntime.Management/main.tsp b/specification/kubernetesruntime/KubernetesRuntime.Management/main.tsp index 89045c8a3037..34c2538aeaed 100644 --- a/specification/kubernetesruntime/KubernetesRuntime.Management/main.tsp +++ b/specification/kubernetesruntime/KubernetesRuntime.Management/main.tsp @@ -1,4 +1,6 @@ import "./storageclass.tsp"; +import "./back-compatible.tsp"; + import "./loadbalancer.tsp"; import "./bgppeer.tsp"; import "./service.tsp"; diff --git a/specification/kubernetesruntime/KubernetesRuntime.Management/tspconfig.yaml b/specification/kubernetesruntime/KubernetesRuntime.Management/tspconfig.yaml index 64577759ea32..4bca92cb2050 100644 --- a/specification/kubernetesruntime/KubernetesRuntime.Management/tspconfig.yaml +++ b/specification/kubernetesruntime/KubernetesRuntime.Management/tspconfig.yaml @@ -10,8 +10,6 @@ options: "@azure-tools/typespec-autorest": emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: resource-manager - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/kubernetesruntime.json" use-read-only-status-schema: true "@azure-tools/typespec-csharp": diff --git a/specification/liftrastronomer/Astronomer.Astro.Management/back-compatible.tsp b/specification/liftrastronomer/Astronomer.Astro.Management/back-compatible.tsp new file mode 100644 index 000000000000..4a3d81eb5c49 --- /dev/null +++ b/specification/liftrastronomer/Astronomer.Astro.Management/back-compatible.tsp @@ -0,0 +1,10 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Astronomer.Astro; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(OrganizationResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/liftrastronomer/Astronomer.Astro.Management/main.tsp b/specification/liftrastronomer/Astronomer.Astro.Management/main.tsp index e3fced1943c9..a99f7d817cdc 100644 --- a/specification/liftrastronomer/Astronomer.Astro.Management/main.tsp +++ b/specification/liftrastronomer/Astronomer.Astro.Management/main.tsp @@ -1,4 +1,5 @@ import "./LiftrBase.Data/main.tsp"; +import "./back-compatible.tsp"; import "@typespec/rest"; import "@typespec/versioning"; diff --git a/specification/liftrastronomer/Astronomer.Astro.Management/tspconfig.yaml b/specification/liftrastronomer/Astronomer.Astro.Management/tspconfig.yaml index 7b5578213673..c3eb5d0f71e5 100644 --- a/specification/liftrastronomer/Astronomer.Astro.Management/tspconfig.yaml +++ b/specification/liftrastronomer/Astronomer.Astro.Management/tspconfig.yaml @@ -14,8 +14,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/astronomer.json" "@azure-tools/typespec-ts": experimental-extensible-enums: true diff --git a/specification/liftrqumulo/Qumulo.Storage.Management/back-compatible.tsp b/specification/liftrqumulo/Qumulo.Storage.Management/back-compatible.tsp new file mode 100644 index 000000000000..3627498f4e5d --- /dev/null +++ b/specification/liftrqumulo/Qumulo.Storage.Management/back-compatible.tsp @@ -0,0 +1,6 @@ +import "@azure-tools/typespec-client-generator-core"; +import "./LiftrBase.Storage/main.tsp"; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(LiftrBase.Storage.FileSystemResource.properties, + "autorest" +); diff --git a/specification/liftrqumulo/Qumulo.Storage.Management/main.tsp b/specification/liftrqumulo/Qumulo.Storage.Management/main.tsp index 67ecb08e33a9..7a6e0b932b90 100644 --- a/specification/liftrqumulo/Qumulo.Storage.Management/main.tsp +++ b/specification/liftrqumulo/Qumulo.Storage.Management/main.tsp @@ -1,4 +1,5 @@ import "./LiftrBase.Storage/main.tsp"; +import "./back-compatible.tsp"; import "@typespec/rest"; import "@typespec/openapi"; diff --git a/specification/liftrqumulo/Qumulo.Storage.Management/tspconfig.yaml b/specification/liftrqumulo/Qumulo.Storage.Management/tspconfig.yaml index 5d848840d5a5..23f49780037c 100644 --- a/specification/liftrqumulo/Qumulo.Storage.Management/tspconfig.yaml +++ b/specification/liftrqumulo/Qumulo.Storage.Management/tspconfig.yaml @@ -10,8 +10,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/Qumulo.Storage.json" "@azure-tools/typespec-ts": experimental-extensible-enums: true diff --git a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/back-compatible.tsp b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/back-compatible.tsp new file mode 100644 index 000000000000..2e43f10f0c6f --- /dev/null +++ b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/back-compatible.tsp @@ -0,0 +1,26 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Azure.ResourceManager; + +using Microsoft.LoadTestService; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(LoadTestMappingResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(LoadTestProfileMappingResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(LoadTestResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(MaxMonthlyVirtualUserHoursResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(QuotaResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/main.tsp b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/main.tsp index e74f32a155c3..70c67570d566 100644 --- a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/main.tsp +++ b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/main.tsp @@ -4,6 +4,7 @@ import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; import "./routes.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Http; using TypeSpec.Rest; diff --git a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/tspconfig.yaml b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/tspconfig.yaml index 512de0f97265..619b799e7ddd 100644 --- a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/tspconfig.yaml +++ b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/loadtesting/tspconfig.yaml @@ -16,8 +16,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}" output-file: "{version-status}/{version}/loadtestservice.json" omit-unreachable-types: true diff --git a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/back-compatible.tsp b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/back-compatible.tsp new file mode 100644 index 000000000000..1dc60399ccf6 --- /dev/null +++ b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/back-compatible.tsp @@ -0,0 +1,20 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Azure.ResourceManager; + +using Playwright.Management; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PlaywrightQuota.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PlaywrightWorkspace.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PlaywrightWorkspaceQuota.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/main.tsp b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/main.tsp index 11144f03b931..0e02e9123576 100644 --- a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/main.tsp +++ b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/main.tsp @@ -2,6 +2,7 @@ import "@typespec/versioning"; import "@azure-tools/typespec-azure-resource-manager"; import "./typespec/routes.tsp"; import "./typespec/quotas.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Versioning; using Azure.ResourceManager; diff --git a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/tspconfig.yaml b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/tspconfig.yaml index 8dea9181b1f8..16aacdc5c6f5 100644 --- a/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/tspconfig.yaml +++ b/specification/loadtestservice/resource-manager/Microsoft.LoadTestService/playwright/tspconfig.yaml @@ -19,8 +19,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}" output-file: "{version-status}/{version}/playwright.json" omit-unreachable-types: true diff --git a/specification/mission/Mission.Management/back-compatible.tsp b/specification/mission/Mission.Management/back-compatible.tsp new file mode 100644 index 000000000000..9c9b1e03dda1 --- /dev/null +++ b/specification/mission/Mission.Management/back-compatible.tsp @@ -0,0 +1,33 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./routes.tsp"; + +using Microsoft.Mission; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ApprovalResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CommunityEndpointResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CommunityResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(EnclaveConnectionResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(EnclaveEndpointResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(EnclaveResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(TransitHubResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/mission/Mission.Management/main.tsp b/specification/mission/Mission.Management/main.tsp index 27d5aa86dee8..02e38b2cdef9 100644 --- a/specification/mission/Mission.Management/main.tsp +++ b/specification/mission/Mission.Management/main.tsp @@ -8,6 +8,7 @@ import "@azure-tools/typespec-azure-resource-manager"; import "./version.tsp"; import "./routes.tsp"; +import "./back-compatible.tsp"; using Azure.ResourceManager; using TypeSpec.Versioning; diff --git a/specification/mission/Mission.Management/tspconfig.yaml b/specification/mission/Mission.Management/tspconfig.yaml index 40c16633de49..08745729c2dc 100644 --- a/specification/mission/Mission.Management/tspconfig.yaml +++ b/specification/mission/Mission.Management/tspconfig.yaml @@ -3,8 +3,6 @@ emit: options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "./resource-manager" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}/../" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" arm-types-dir: "{project-root}/../../common-types/resource-management" diff --git a/specification/monitor/Microsoft.Monitor.Management/back-compatible.tsp b/specification/monitor/Microsoft.Monitor.Management/back-compatible.tsp new file mode 100644 index 000000000000..c3e1578ec049 --- /dev/null +++ b/specification/monitor/Microsoft.Monitor.Management/back-compatible.tsp @@ -0,0 +1,16 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./typespec/azureMonitorWorkspace.tsp"; +import "./typespec/pipelineGroup.tsp"; + +using Microsoft.Monitor; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AzureMonitorWorkspace.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PipelineGroup.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/monitor/Microsoft.Monitor.Management/main.tsp b/specification/monitor/Microsoft.Monitor.Management/main.tsp index 4eed154f7fe1..f12f515d5c87 100644 --- a/specification/monitor/Microsoft.Monitor.Management/main.tsp +++ b/specification/monitor/Microsoft.Monitor.Management/main.tsp @@ -1,3 +1,4 @@ import "./typespec/service.tsp"; import "./typespec/azureMonitorWorkspace.tsp"; import "./typespec/pipelineGroup.tsp"; +import "./back-compatible.tsp"; diff --git a/specification/monitor/Microsoft.Monitor.Management/tspconfig.yaml b/specification/monitor/Microsoft.Monitor.Management/tspconfig.yaml index e342c030488c..077403c329bc 100644 --- a/specification/monitor/Microsoft.Monitor.Management/tspconfig.yaml +++ b/specification/monitor/Microsoft.Monitor.Management/tspconfig.yaml @@ -11,8 +11,6 @@ options: use-read-only-status-schema: true azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}/.." output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azuremonitor.json" new-line: lf diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/ManagedIdentity/back-compatible.tsp b/specification/msi/resource-manager/Microsoft.ManagedIdentity/ManagedIdentity/back-compatible.tsp index 5c8130261c76..3022f65c7c50 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/ManagedIdentity/back-compatible.tsp +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/ManagedIdentity/back-compatible.tsp @@ -3,6 +3,15 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.ManagedIdentity; +// Flatten properties for backward compatibility +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: added in TypeSpec migration, follow aka.ms/tsp/conversion-fix for details" +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SystemAssignedIdentity.properties, + "autorest" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: added in TypeSpec migration, follow aka.ms/tsp/conversion-fix for details" +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Identity.properties, + "autorest" +); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: added in TypeSpec migration, follow aka.ms/tsp/conversion-fix for details" @@Azure.ClientGenerator.Core.Legacy.flattenProperty(IdentityUpdate.properties); diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/ManagedIdentity/tspconfig.yaml b/specification/msi/resource-manager/Microsoft.ManagedIdentity/ManagedIdentity/tspconfig.yaml index bdecf02f7aad..16d78a31e035 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/ManagedIdentity/tspconfig.yaml +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/ManagedIdentity/tspconfig.yaml @@ -12,7 +12,7 @@ options: output-file: "{version-status}/{version}/ManagedIdentity.json" examples-dir: "{project-root}/examples" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - arm-resource-flattening: true + "@azure-tools/typespec-python": emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-msi" namespace: "azure.mgmt.msi" diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/tspconfig.yaml b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/tspconfig.yaml index 16966f5f14d6..577f73c9946e 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/tspconfig.yaml +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/tspconfig.yaml @@ -10,7 +10,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{version-status}/{version}/openapi.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + arm-types-dir: "{project-root}/../../../../common-types/resource-management" emit-lro-options: "all" "@azure-tools/typespec-csharp": diff --git a/specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml b/specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml index 5de24f8eddfc..a0da69478e5e 100644 --- a/specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml +++ b/specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml @@ -14,7 +14,7 @@ options: output-file: "{version-status}/{version}/netapp.json" emit-lro-options: "all" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + arm-types-dir: "{project-root}/../../../../common-types/resource-management" "@azure-tools/typespec-csharp": flavor: azure diff --git a/specification/oracle/Oracle.Database.Management/back-compatible.tsp b/specification/oracle/Oracle.Database.Management/back-compatible.tsp new file mode 100644 index 000000000000..b3cf62828c34 --- /dev/null +++ b/specification/oracle/Oracle.Database.Management/back-compatible.tsp @@ -0,0 +1,96 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./operations/autonomousdatabase/autonomousDatabaseOperations.tsp"; +import "./operations/autonomousdatabase/autonomousDatabaseBackupOperations.tsp"; +import "./operations/autonomousdatabase/autonomousDatabaseCharacterSetOperations.tsp"; +import "./operations/autonomousdatabase/autonomousDatabaseNationalCharacterSetOperations.tsp"; +import "./operations/autonomousdatabase/autonomousDatabaseVersionOperations.tsp"; +import "./operations/exadata/exadatainfrastructureOperations.tsp"; +import "./operations/exadata/dbServersOperations.tsp"; +import "./operations/exadata/vmclusterOperations.tsp"; +import "./operations/exadata/virtualNetworkAddressOperations.tsp"; +import "./operations/exadata/systemVersionOperations.tsp"; +import "./operations/oraclesubscription/oracleSubscriptionOperations.tsp"; +import "./operations/exadata/dbNodesOperations.tsp"; +import "./operations/exadata/dbSystemShapeOperations.tsp"; +import "./operations/exadata/dnsPrivateViewsOperations.tsp"; +import "./operations/exadata/dnsPrivateZonesOperations.tsp"; +import "./operations/exadata/giVersionOperations.tsp"; + +using Oracle.Database; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AutonomousDatabaseBackup.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AutonomousDatabaseCharacterSet.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AutonomousDatabaseNationalCharacterSet.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AutonomousDbVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CloudExadataInfrastructure.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CloudVmCluster.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DbNode.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DbServer.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DbSystemShape.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DnsPrivateView.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DnsPrivateZone.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(GiVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(OracleSubscription.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SystemVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualNetworkAddress.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DbSystem.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DbVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExascaleDbNode.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExadbVmCluster.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ResourceAnchor.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExascaleDbStorageVault.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(FlexComponent.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(GiMinorVersion.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(NetworkAnchor.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/oracle/Oracle.Database.Management/main.tsp b/specification/oracle/Oracle.Database.Management/main.tsp index 6739428b1b32..d7ec586d02fc 100644 --- a/specification/oracle/Oracle.Database.Management/main.tsp +++ b/specification/oracle/Oracle.Database.Management/main.tsp @@ -26,6 +26,7 @@ import "./operations/anchors/resourceAnchorOperations.tsp"; import "./operations/basedb/dbSystemOperations.tsp"; import "./operations/basedb/dbVersionOperations.tsp"; import "./versions.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Http; using TypeSpec.Rest; diff --git a/specification/oracle/Oracle.Database.Management/tspconfig.yaml b/specification/oracle/Oracle.Database.Management/tspconfig.yaml index b8f6a4bd650c..c6877921ba4e 100644 --- a/specification/oracle/Oracle.Database.Management/tspconfig.yaml +++ b/specification/oracle/Oracle.Database.Management/tspconfig.yaml @@ -13,8 +13,6 @@ options: use-read-only-status-schema: true azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}/.." output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" "@azure-tools/typespec-ts": diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2024-06-01-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2024-06-01-preview/openapi.json index d0d14e6af26d..08d415c967c8 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2024-06-01-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2024-06-01-preview/openapi.json @@ -4004,8 +4004,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2024-08-01-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2024-08-01-preview/openapi.json index 584bf40c79b9..a60b3bbd4058 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2024-08-01-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2024-08-01-preview/openapi.json @@ -4004,8 +4004,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2024-10-01-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2024-10-01-preview/openapi.json index c181b2da1be1..8628b9afeb50 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2024-10-01-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2024-10-01-preview/openapi.json @@ -4086,8 +4086,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2024-12-01-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2024-12-01-preview/openapi.json index 32e12ba09f2f..bfbab1e2224b 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2024-12-01-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2024-12-01-preview/openapi.json @@ -5158,8 +5158,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2025-01-01-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2025-01-01-preview/openapi.json index 0db88aae582b..6f1be73ebab3 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2025-01-01-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2025-01-01-preview/openapi.json @@ -5253,8 +5253,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2025-04-01-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2025-04-01-preview/openapi.json index a3d4154e7617..46c36386562b 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2025-04-01-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2025-04-01-preview/openapi.json @@ -6286,8 +6286,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2025-06-01-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2025-06-01-preview/openapi.json index 1b362de10909..7e223e8f16b7 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2025-06-01-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2025-06-01-preview/openapi.json @@ -6380,8 +6380,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2025-07-01-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2025-07-01-preview/openapi.json index 2d5fa5c0003a..f21eb1732ca7 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2025-07-01-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2025-07-01-preview/openapi.json @@ -6870,8 +6870,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2025-08-01-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2025-08-01-preview/openapi.json index 28d0236b8615..8e0f3b867aa6 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2025-08-01-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2025-08-01-preview/openapi.json @@ -6959,8 +6959,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/preview/2025-08-15-preview/openapi.json b/specification/oracle/resource-manager/Oracle.Database/preview/2025-08-15-preview/openapi.json index b6f519411fd1..dd632ece9ed1 100644 --- a/specification/oracle/resource-manager/Oracle.Database/preview/2025-08-15-preview/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/preview/2025-08-15-preview/openapi.json @@ -6959,8 +6959,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/openapi.json b/specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/openapi.json index 85fb6761fae6..bc485f3cbb1e 100644 --- a/specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/openapi.json @@ -3916,8 +3916,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/openapi.json b/specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/openapi.json index c786f7c1496e..ed8222ba0407 100644 --- a/specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/openapi.json @@ -4004,8 +4004,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/openapi.json b/specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/openapi.json index 74dcbbb823a1..23289fb8a891 100644 --- a/specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/openapi.json @@ -5253,8 +5253,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/oracle/resource-manager/Oracle.Database/stable/2025-09-01/openapi.json b/specification/oracle/resource-manager/Oracle.Database/stable/2025-09-01/openapi.json index 34a7ce782dbf..8bcb023dfde0 100644 --- a/specification/oracle/resource-manager/Oracle.Database/stable/2025-09-01/openapi.json +++ b/specification/oracle/resource-manager/Oracle.Database/stable/2025-09-01/openapi.json @@ -6959,8 +6959,7 @@ "properties": { "properties": { "$ref": "#/definitions/AutonomousDatabaseBaseProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/back-compatible.tsp b/specification/playwrighttesting/PlaywrightTesting.Management/back-compatible.tsp new file mode 100644 index 000000000000..72ae6e2640a3 --- /dev/null +++ b/specification/playwrighttesting/PlaywrightTesting.Management/back-compatible.tsp @@ -0,0 +1,17 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Microsoft.AzurePlaywrightService; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Account.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AccountQuota.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Quota.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/main.tsp b/specification/playwrighttesting/PlaywrightTesting.Management/main.tsp index 82967fa0b34b..a56137c530f4 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/main.tsp +++ b/specification/playwrighttesting/PlaywrightTesting.Management/main.tsp @@ -3,6 +3,7 @@ import "@typespec/rest"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "./back-compatible.tsp"; using TypeSpec.Http; using TypeSpec.Rest; diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/tspconfig.yaml b/specification/playwrighttesting/PlaywrightTesting.Management/tspconfig.yaml index f631b5792081..6e037e50f1a5 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/tspconfig.yaml +++ b/specification/playwrighttesting/PlaywrightTesting.Management/tspconfig.yaml @@ -15,8 +15,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}/.." output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/playwrighttesting.json" omit-unreachable-types: true diff --git a/specification/portalservices/CopilotSettings.Management/back-compatible.tsp b/specification/portalservices/CopilotSettings.Management/back-compatible.tsp new file mode 100644 index 000000000000..2543e0e11417 --- /dev/null +++ b/specification/portalservices/CopilotSettings.Management/back-compatible.tsp @@ -0,0 +1,11 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Microsoft.PortalServices; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CopilotSettingsResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/portalservices/CopilotSettings.Management/main.tsp b/specification/portalservices/CopilotSettings.Management/main.tsp index 82744303eafb..f24086c74387 100644 --- a/specification/portalservices/CopilotSettings.Management/main.tsp +++ b/specification/portalservices/CopilotSettings.Management/main.tsp @@ -5,6 +5,7 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; import "./models.tsp"; import "./CopilotSettings.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Rest; using TypeSpec.Versioning; diff --git a/specification/portalservices/CopilotSettings.Management/tspconfig.yaml b/specification/portalservices/CopilotSettings.Management/tspconfig.yaml index ae477e7cdd11..791531ada995 100644 --- a/specification/portalservices/CopilotSettings.Management/tspconfig.yaml +++ b/specification/portalservices/CopilotSettings.Management/tspconfig.yaml @@ -7,8 +7,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}/.." omit-unreachable-types: true output-file: "{azure-resource-provider-folder}/{service-name}/copilotSettings/{version-status}/{version}/copilotSettings.json" diff --git a/specification/portalservices/Extension.Management/tspconfig.yaml b/specification/portalservices/Extension.Management/tspconfig.yaml index b2fb1da05f76..57f494645900 100644 --- a/specification/portalservices/Extension.Management/tspconfig.yaml +++ b/specification/portalservices/Extension.Management/tspconfig.yaml @@ -6,8 +6,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/extensions/{version-status}/{version}/extensions.json" omit-unreachable-types: true linter: diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/PostgresqlHsc/tspconfig.yaml b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/PostgresqlHsc/tspconfig.yaml index 40ea60bce773..70d8fe670b11 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/PostgresqlHsc/tspconfig.yaml +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/PostgresqlHsc/tspconfig.yaml @@ -10,7 +10,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{version-status}/{version}/postgresqlhsc.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + arm-types-dir: "{project-root}/../../../../common-types/resource-management" "@azure-tools/typespec-python": service-dir: "sdk/cosmosdbforpostgresql" diff --git a/specification/programmableconnectivity/ProgrammableConnectivity.Management/back-compatible.tsp b/specification/programmableconnectivity/ProgrammableConnectivity.Management/back-compatible.tsp new file mode 100644 index 000000000000..ce881aaaef38 --- /dev/null +++ b/specification/programmableconnectivity/ProgrammableConnectivity.Management/back-compatible.tsp @@ -0,0 +1,17 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Microsoft.ProgrammableConnectivity; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Gateway.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(OperatorApiConnection.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(OperatorApiPlan.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/programmableconnectivity/ProgrammableConnectivity.Management/main.tsp b/specification/programmableconnectivity/ProgrammableConnectivity.Management/main.tsp index f444c98dcce5..b21012fce4b2 100644 --- a/specification/programmableconnectivity/ProgrammableConnectivity.Management/main.tsp +++ b/specification/programmableconnectivity/ProgrammableConnectivity.Management/main.tsp @@ -6,6 +6,7 @@ import "./models.tsp"; import "./Gateway.tsp"; import "./OperatorApiConnection.tsp"; import "./OperatorApiPlan.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Rest; using TypeSpec.Http; diff --git a/specification/programmableconnectivity/ProgrammableConnectivity.Management/tspconfig.yaml b/specification/programmableconnectivity/ProgrammableConnectivity.Management/tspconfig.yaml index 611d9427c91f..d1f9c577230f 100644 --- a/specification/programmableconnectivity/ProgrammableConnectivity.Management/tspconfig.yaml +++ b/specification/programmableconnectivity/ProgrammableConnectivity.Management/tspconfig.yaml @@ -10,7 +10,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" emit-common-types-schema: never - arm-resource-flattening: true + "@azure-tools/typespec-python": emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-programmableconnectivity" namespace: "azure.mgmt.programmableconnectivity" diff --git a/specification/purestorage/PureStorage.Block.Management/back-compatible.tsp b/specification/purestorage/PureStorage.Block.Management/back-compatible.tsp new file mode 100644 index 000000000000..68dfe0b8673f --- /dev/null +++ b/specification/purestorage/PureStorage.Block.Management/back-compatible.tsp @@ -0,0 +1,27 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./LiftrBase.Storage/main.tsp"; + +using PureStorage.Block; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AvsStorageContainer.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AvsStorageContainerVolume.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AvsVm.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(LiftrBase.Storage.Reservation.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AvsVmVolume.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(StoragePool.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/purestorage/PureStorage.Block.Management/main.tsp b/specification/purestorage/PureStorage.Block.Management/main.tsp index 862252bb7616..98ac447deb20 100644 --- a/specification/purestorage/PureStorage.Block.Management/main.tsp +++ b/specification/purestorage/PureStorage.Block.Management/main.tsp @@ -1,4 +1,5 @@ import "./LiftrBase.Storage/main.tsp"; +import "./back-compatible.tsp"; import "@typespec/openapi"; @armProviderNamespace diff --git a/specification/purestorage/PureStorage.Block.Management/tspconfig.yaml b/specification/purestorage/PureStorage.Block.Management/tspconfig.yaml index 9c44a9015af3..f73b6bcc1020 100644 --- a/specification/purestorage/PureStorage.Block.Management/tspconfig.yaml +++ b/specification/purestorage/PureStorage.Block.Management/tspconfig.yaml @@ -13,7 +13,7 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/purestorage.json" - arm-resource-flattening: true + emit-common-types-schema: "never" "@azure-tools/typespec-csharp": emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" diff --git a/specification/purviewpolicy/resource-manager/Microsoft.Purview/PurviewPolicy/tspconfig.yaml b/specification/purviewpolicy/resource-manager/Microsoft.Purview/PurviewPolicy/tspconfig.yaml index 7be74fc74eb3..cbc214bf9b6d 100644 --- a/specification/purviewpolicy/resource-manager/Microsoft.Purview/PurviewPolicy/tspconfig.yaml +++ b/specification/purviewpolicy/resource-manager/Microsoft.Purview/PurviewPolicy/tspconfig.yaml @@ -5,8 +5,6 @@ options: emitter-output-dir: "{project-root}" azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{version-status}/{version}/policy.json" arm-types-dir: "{project-root}/../../../../common-types/resource-management" omit-unreachable-types: true diff --git a/specification/relay/resource-manager/Microsoft.Relay/Relay/tspconfig.yaml b/specification/relay/resource-manager/Microsoft.Relay/Relay/tspconfig.yaml index b56bb886fa77..0c90039f6424 100644 --- a/specification/relay/resource-manager/Microsoft.Relay/Relay/tspconfig.yaml +++ b/specification/relay/resource-manager/Microsoft.Relay/Relay/tspconfig.yaml @@ -11,7 +11,7 @@ options: output-file: "{version-status}/{version}/relay.json" examples-dir: "{project-root}/examples" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - arm-resource-flattening: true + emit-lro-options: "all" "@azure-tools/typespec-python": emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-relay" diff --git a/specification/scvmm/ScVmm.Management/BackCompat.tsp b/specification/scvmm/ScVmm.Management/BackCompat.tsp index c3c19443400b..9e14c9616337 100644 --- a/specification/scvmm/ScVmm.Management/BackCompat.tsp +++ b/specification/scvmm/ScVmm.Management/BackCompat.tsp @@ -1,3 +1,35 @@ import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; @@visibility(Azure.Core.Page.nextLink, Lifecycle.Read); + +using Microsoft.ScVmm; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AvailabilitySet.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Cloud.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(GuestAgent.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachineInstance.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachineTemplate.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualNetwork.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VmInstanceHybridIdentityMetadata.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VmmServer.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/scvmm/ScVmm.Management/tspconfig.yaml b/specification/scvmm/ScVmm.Management/tspconfig.yaml index b85fd25bd1f1..50207dad2969 100644 --- a/specification/scvmm/ScVmm.Management/tspconfig.yaml +++ b/specification/scvmm/ScVmm.Management/tspconfig.yaml @@ -10,8 +10,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/scvmm.json" "@azure-tools/typespec-ts": experimental-extensible-enums: true diff --git a/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/scvmm.json b/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/scvmm.json index a47208794c03..470b8c38bcd1 100644 --- a/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/scvmm.json +++ b/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2023-10-07/scvmm.json @@ -3806,8 +3806,7 @@ "properties": { "properties": { "$ref": "#/definitions/InventoryItemProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." }, "kind": { "type": "string", diff --git a/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2024-06-01/scvmm.json b/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2024-06-01/scvmm.json index 0f5d03c0273c..064c81bd7939 100644 --- a/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2024-06-01/scvmm.json +++ b/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2024-06-01/scvmm.json @@ -3818,8 +3818,7 @@ "properties": { "properties": { "$ref": "#/definitions/InventoryItemProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." }, "kind": { "type": "string", diff --git a/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2025-03-13/scvmm.json b/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2025-03-13/scvmm.json index 466c25630699..85c12a7eaec1 100644 --- a/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2025-03-13/scvmm.json +++ b/specification/scvmm/resource-manager/Microsoft.ScVmm/stable/2025-03-13/scvmm.json @@ -3824,8 +3824,7 @@ "properties": { "properties": { "$ref": "#/definitions/InventoryItemProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." }, "kind": { "type": "string", diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/back-compatible.tsp b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/back-compatible.tsp new file mode 100644 index 000000000000..ad6fc60995ed --- /dev/null +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/back-compatible.tsp @@ -0,0 +1,23 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Azure.ResourceManager; + +using Microsoft.ServiceNetworking; + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Association.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Frontend.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SecurityPolicy.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(TrafficController.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/main.tsp b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/main.tsp index 2fa523fa0e4e..669237bc82ff 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/main.tsp +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/main.tsp @@ -4,6 +4,7 @@ import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; import "@azure-tools/typespec-client-generator-core"; +import "./back-compatible.tsp"; /** Traffic Controller Provider management API. */ @armProviderNamespace diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/tspconfig.yaml b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/tspconfig.yaml index 47c2134e5c10..4814760e19d5 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/tspconfig.yaml +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/ServiceNetworking/tspconfig.yaml @@ -12,8 +12,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}" output-file: "{version-status}/{version}/TrafficController.json" arm-types-dir: "{project-root}/../../../../common-types/resource-management" diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/SignalRService/tspconfig.yaml b/specification/signalr/resource-manager/Microsoft.SignalRService/SignalRService/tspconfig.yaml index 6d35cce3113e..577984631586 100644 --- a/specification/signalr/resource-manager/Microsoft.SignalRService/SignalRService/tspconfig.yaml +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/SignalRService/tspconfig.yaml @@ -10,7 +10,7 @@ options: azure-resource-provider-folder: "resource-manager" output-file: "{version-status}/{version}/signalr.json" examples-dir: "{project-root}/examples" - arm-resource-flattening: true + emit-lro-options: "all" arm-types-dir: "{project-root}/../../../../common-types/resource-management" "@azure-tools/typespec-csharp": diff --git a/specification/sphere/Sphere.Management/back-compatible.tsp b/specification/sphere/Sphere.Management/back-compatible.tsp new file mode 100644 index 000000000000..362d359783e6 --- /dev/null +++ b/specification/sphere/Sphere.Management/back-compatible.tsp @@ -0,0 +1,29 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Microsoft.AzureSphere; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Catalog.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Certificate.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Deployment.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Device.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DeviceGroup.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Image.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Product.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/sphere/Sphere.Management/main.tsp b/specification/sphere/Sphere.Management/main.tsp index 5f8f65c5f696..1ba8c9c7645a 100644 --- a/specification/sphere/Sphere.Management/main.tsp +++ b/specification/sphere/Sphere.Management/main.tsp @@ -10,6 +10,7 @@ import "./product.tsp"; import "./deviceGroup.tsp"; import "./deployment.tsp"; import "./device.tsp"; +import "./back-compatible.tsp"; using TypeSpec.Rest; using TypeSpec.Http; diff --git a/specification/sphere/Sphere.Management/tspconfig.yaml b/specification/sphere/Sphere.Management/tspconfig.yaml index fc17f1ba4e55..9cc8b5e5a985 100644 --- a/specification/sphere/Sphere.Management/tspconfig.yaml +++ b/specification/sphere/Sphere.Management/tspconfig.yaml @@ -9,8 +9,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azuresphere.json" "@azure-tools/cadl-python": "basic-setup-py": true diff --git a/specification/splitio/SplitIO.Experimentation.Management/back-compatible.tsp b/specification/splitio/SplitIO.Experimentation.Management/back-compatible.tsp new file mode 100644 index 000000000000..dfbcd106ef81 --- /dev/null +++ b/specification/splitio/SplitIO.Experimentation.Management/back-compatible.tsp @@ -0,0 +1,9 @@ +// Contains overrides to make the Autorest Swagger2.0 back compatible +using SplitIO.Experimentation; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExperimentationWorkspace.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/splitio/SplitIO.Experimentation.Management/main.tsp b/specification/splitio/SplitIO.Experimentation.Management/main.tsp index f7621caa0964..836ef22594b6 100644 --- a/specification/splitio/SplitIO.Experimentation.Management/main.tsp +++ b/specification/splitio/SplitIO.Experimentation.Management/main.tsp @@ -3,6 +3,9 @@ import "@typespec/versioning"; import "@azure-tools/typespec-autorest"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@azure-tools/typespec-client-generator-core"; + +import "./back-compatible.tsp"; using Azure.ResourceManager; using TypeSpec.Http; diff --git a/specification/splitio/SplitIO.Experimentation.Management/tspconfig.yaml b/specification/splitio/SplitIO.Experimentation.Management/tspconfig.yaml index b76951bb1fea..2799f686dc2a 100644 --- a/specification/splitio/SplitIO.Experimentation.Management/tspconfig.yaml +++ b/specification/splitio/SplitIO.Experimentation.Management/tspconfig.yaml @@ -5,8 +5,6 @@ options: "@azure-tools/typespec-autorest": emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/splitio.json" linter: extends: diff --git a/specification/standbypool/StandbyPool.Management/back-compatible.tsp b/specification/standbypool/StandbyPool.Management/back-compatible.tsp new file mode 100644 index 000000000000..f0f6e8bef6f5 --- /dev/null +++ b/specification/standbypool/StandbyPool.Management/back-compatible.tsp @@ -0,0 +1,28 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./standbyVMPool.tsp"; +import "./standbyVM.tsp"; +import "./standbyVirtualMachinePoolRuntimeView.tsp"; +import "./standbyContainerGroupPool.tsp"; +import "./standbyContainerGroupPoolRuntimeView.tsp"; + +using Microsoft.StandbyPool; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(StandbyContainerGroupPoolResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(StandbyContainerGroupPoolRuntimeViewResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(StandbyVirtualMachinePoolResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(StandbyVirtualMachinePoolRuntimeViewResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(StandbyVirtualMachineResource.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Azure.ResourceManager.Foundations.ResourceUpdateModel.properties, + "autorest" +); diff --git a/specification/standbypool/StandbyPool.Management/main.tsp b/specification/standbypool/StandbyPool.Management/main.tsp index 2093761eea67..22c76eb13228 100644 --- a/specification/standbypool/StandbyPool.Management/main.tsp +++ b/specification/standbypool/StandbyPool.Management/main.tsp @@ -10,3 +10,4 @@ import "./standbyVM.tsp"; import "./standbyVirtualMachinePoolRuntimeView.tsp"; import "./standbyContainerGroupPool.tsp"; import "./standbyContainerGroupPoolRuntimeView.tsp"; +import "./back-compatible.tsp"; diff --git a/specification/standbypool/StandbyPool.Management/tspconfig.yaml b/specification/standbypool/StandbyPool.Management/tspconfig.yaml index cc6400d55f72..11b877626c02 100644 --- a/specification/standbypool/StandbyPool.Management/tspconfig.yaml +++ b/specification/standbypool/StandbyPool.Management/tspconfig.yaml @@ -11,8 +11,6 @@ options: use-read-only-status-schema: true azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}/.." output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/standbypool.json" diff --git a/specification/storagesync/resource-manager/Microsoft.StorageSync/StorageSync/tspconfig.yaml b/specification/storagesync/resource-manager/Microsoft.StorageSync/StorageSync/tspconfig.yaml index cf502b31f68b..4eb6ac9797e7 100644 --- a/specification/storagesync/resource-manager/Microsoft.StorageSync/StorageSync/tspconfig.yaml +++ b/specification/storagesync/resource-manager/Microsoft.StorageSync/StorageSync/tspconfig.yaml @@ -11,7 +11,7 @@ options: output-file: "{version-status}/{version}/storagesync.json" examples-dir: "{project-root}/examples" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - arm-resource-flattening: true + emit-lro-options: "all" "@azure-tools/typespec-python": service-dir: "sdk/storage" diff --git a/specification/support/resource-manager/Microsoft.Support/Support/tspconfig.yaml b/specification/support/resource-manager/Microsoft.Support/Support/tspconfig.yaml index 4bfc19d1d187..bb0a68373ebf 100644 --- a/specification/support/resource-manager/Microsoft.Support/Support/tspconfig.yaml +++ b/specification/support/resource-manager/Microsoft.Support/Support/tspconfig.yaml @@ -16,7 +16,7 @@ options: output-file: "{version-status}/{version}/support.json" examples-dir: "{project-root}/examples" arm-types-dir: "{project-root}/../../../../common-types/resource-management" - arm-resource-flattening: true + emit-lro-options: "all" "@azure-tools/typespec-python": emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-support" diff --git a/specification/verifiedid/Microsoft.VerifiedId.Management/back-compatible.tsp b/specification/verifiedid/Microsoft.VerifiedId.Management/back-compatible.tsp new file mode 100644 index 000000000000..127bd112e688 --- /dev/null +++ b/specification/verifiedid/Microsoft.VerifiedId.Management/back-compatible.tsp @@ -0,0 +1,8 @@ +import "@azure-tools/typespec-client-generator-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using Microsoft.VerifiedId; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Authority.properties, + "autorest" +); diff --git a/specification/verifiedid/Microsoft.VerifiedId.Management/main.tsp b/specification/verifiedid/Microsoft.VerifiedId.Management/main.tsp index d1332c5f0667..787521711d79 100644 --- a/specification/verifiedid/Microsoft.VerifiedId.Management/main.tsp +++ b/specification/verifiedid/Microsoft.VerifiedId.Management/main.tsp @@ -4,6 +4,8 @@ import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "./back-compatible.tsp"; + using TypeSpec.Http; using TypeSpec.Rest; using TypeSpec.Versioning; diff --git a/specification/verifiedid/Microsoft.VerifiedId.Management/tspconfig.yaml b/specification/verifiedid/Microsoft.VerifiedId.Management/tspconfig.yaml index ef68ffa2bfb3..d8040e8a2e4c 100644 --- a/specification/verifiedid/Microsoft.VerifiedId.Management/tspconfig.yaml +++ b/specification/verifiedid/Microsoft.VerifiedId.Management/tspconfig.yaml @@ -10,8 +10,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}/.." output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/verifiedid.json" use-read-only-status-schema: true diff --git a/specification/vmware/resource-manager/Microsoft.AVS/AVS/back-compatible.tsp b/specification/vmware/resource-manager/Microsoft.AVS/AVS/back-compatible.tsp index 141fe3a9b5d2..f9c838042cf1 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/AVS/back-compatible.tsp +++ b/specification/vmware/resource-manager/Microsoft.AVS/AVS/back-compatible.tsp @@ -12,7 +12,7 @@ import "./workloadNetworks-dhcpConfigurations.tsp"; using Azure.ClientGenerator.Core; -namespace Microsoft.AVS; +using Microsoft.AVS; @@clientLocation(WorkloadNetworkVmGroups.list, WorkloadNetworks, "!csharp"); @@clientLocation(WorkloadNetworkVmGroups.get, WorkloadNetworks, "!csharp"); @@ -161,3 +161,76 @@ namespace Microsoft.AVS; @@clientName(WorkloadNetworkDhcpConfigurations.create, "CreateDhcp"); @@clientName(WorkloadNetworkDhcpConfigurations.update, "UpdateDhcp"); @@clientName(WorkloadNetworkDhcpConfigurations.delete, "DeleteDhcp"); + +// Flatten properties for backward compatibility +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CloudLink.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Cluster.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Datastore.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExpressRouteAuthorization.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(GlobalReachConnection.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(HcxEnterpriseSite.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(IscsiPath.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateCloud.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ProvisionedNetwork.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PureStoragePolicy.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ScriptCmdlet.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ScriptPackage.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(VirtualMachine.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadNetworkDnsService.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadNetworkDnsZone.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadNetworkGateway.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadNetworkPortMirroring.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadNetwork.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadNetworkPublicIP.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadNetworkSegment.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadNetworkVMGroup.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(WorkloadNetworkVirtualMachine.properties, + "autorest" +); + +// Discriminated type +// @@Azure.ClientGenerator.Core.Legacy.flattenProperty(Addon.properties, +// "autorest" +// ); diff --git a/specification/vmware/resource-manager/Microsoft.AVS/AVS/stable/2023-09-01/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/AVS/stable/2023-09-01/vmware.json index cb6c81afaca5..e5202e6f36b7 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/AVS/stable/2023-09-01/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/AVS/stable/2023-09-01/vmware.json @@ -6492,8 +6492,7 @@ "properties": { "properties": { "$ref": "#/definitions/AddonProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ @@ -8400,8 +8399,7 @@ "properties": { "properties": { "$ref": "#/definitions/PlacementPolicyProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ @@ -9144,8 +9142,7 @@ "properties": { "properties": { "$ref": "#/definitions/ScriptExecutionProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ @@ -10029,8 +10026,7 @@ "properties": { "properties": { "$ref": "#/definitions/WorkloadNetworkDhcpEntity", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/vmware/resource-manager/Microsoft.AVS/AVS/stable/2024-09-01/vmware.json b/specification/vmware/resource-manager/Microsoft.AVS/AVS/stable/2024-09-01/vmware.json index 95dd648964b8..02bedfada8b5 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/AVS/stable/2024-09-01/vmware.json +++ b/specification/vmware/resource-manager/Microsoft.AVS/AVS/stable/2024-09-01/vmware.json @@ -7031,8 +7031,7 @@ "properties": { "properties": { "$ref": "#/definitions/AddonProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ @@ -8642,8 +8641,7 @@ "properties": { "properties": { "$ref": "#/definitions/HostProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." }, "zones": { "type": "array", @@ -9159,8 +9157,7 @@ "properties": { "properties": { "$ref": "#/definitions/PlacementPolicyProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ @@ -10441,8 +10438,7 @@ "properties": { "properties": { "$ref": "#/definitions/ScriptExecutionProperties", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ @@ -11336,8 +11332,7 @@ "properties": { "properties": { "$ref": "#/definitions/WorkloadNetworkDhcpEntity", - "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true + "description": "The resource-specific properties for this resource." } }, "allOf": [ diff --git a/specification/vmware/resource-manager/Microsoft.AVS/AVS/tspconfig.yaml b/specification/vmware/resource-manager/Microsoft.AVS/AVS/tspconfig.yaml index b608180b0716..df9289eec908 100644 --- a/specification/vmware/resource-manager/Microsoft.AVS/AVS/tspconfig.yaml +++ b/specification/vmware/resource-manager/Microsoft.AVS/AVS/tspconfig.yaml @@ -11,8 +11,6 @@ options: "@azure-tools/typespec-autorest": azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true emitter-output-dir: "{project-root}" output-file: "{version-status}/{version}/vmware.json" arm-types-dir: "{project-root}/../../../../common-types/resource-management" diff --git a/specification/workloads/Workloads.Operations.Management/tspconfig.yaml b/specification/workloads/Workloads.Operations.Management/tspconfig.yaml index ce55d803eae4..4a8f1edff056 100644 --- a/specification/workloads/Workloads.Operations.Management/tspconfig.yaml +++ b/specification/workloads/Workloads.Operations.Management/tspconfig.yaml @@ -6,8 +6,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/operations/{version-status}/{version}/operations.json" linter: extends: diff --git a/specification/workloads/Workloads.SAPDiscoverySite.Management/back-compatible.tsp b/specification/workloads/Workloads.SAPDiscoverySite.Management/back-compatible.tsp index 05e4917efe26..401514d4ce18 100644 --- a/specification/workloads/Workloads.SAPDiscoverySite.Management/back-compatible.tsp +++ b/specification/workloads/Workloads.SAPDiscoverySite.Management/back-compatible.tsp @@ -5,3 +5,13 @@ using Microsoft.Workloads; @@clientName(SAPDiscoverySites, "SapDiscoverySites", "autorest"); @@clientName(SAPInstances, "SapInstances", "autorest"); + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SAPDiscoverySite.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SAPInstance.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ServerInstance.properties, + "autorest" +); diff --git a/specification/workloads/Workloads.SAPDiscoverySite.Management/tspconfig.yaml b/specification/workloads/Workloads.SAPDiscoverySite.Management/tspconfig.yaml index 3931ded444cb..7a0c9827f0c6 100644 --- a/specification/workloads/Workloads.SAPDiscoverySite.Management/tspconfig.yaml +++ b/specification/workloads/Workloads.SAPDiscoverySite.Management/tspconfig.yaml @@ -9,8 +9,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/SAPDiscoverySites/{version-status}/{version}/SAPDiscoverySites.json" "@azure-tools/typespec-ts": experimental-extensible-enums: true diff --git a/specification/workloads/Workloads.SAPMonitor.Management/back-compatible.tsp b/specification/workloads/Workloads.SAPMonitor.Management/back-compatible.tsp new file mode 100644 index 000000000000..d0d2d9a5c19a --- /dev/null +++ b/specification/workloads/Workloads.SAPMonitor.Management/back-compatible.tsp @@ -0,0 +1,21 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; + +using Microsoft.Workloads; + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Alert.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(AlertTemplate.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Monitor.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ProviderInstance.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SapLandscapeMonitorResource.properties, + "autorest" +); diff --git a/specification/workloads/Workloads.SAPMonitor.Management/main.tsp b/specification/workloads/Workloads.SAPMonitor.Management/main.tsp index 063edf772a54..682faf1901cb 100644 --- a/specification/workloads/Workloads.SAPMonitor.Management/main.tsp +++ b/specification/workloads/Workloads.SAPMonitor.Management/main.tsp @@ -8,6 +8,7 @@ import "./ProviderInstance.tsp"; import "./SapLandscapeMonitor.tsp"; import "./Alert.tsp"; import "./AlertTemplate.tsp"; +import "./back-compatible.tsp"; using Azure.ResourceManager; using TypeSpec.Versioning; diff --git a/specification/workloads/Workloads.SAPMonitor.Management/tspconfig.yaml b/specification/workloads/Workloads.SAPMonitor.Management/tspconfig.yaml index 751f5cf55247..09ed9fe0aa65 100644 --- a/specification/workloads/Workloads.SAPMonitor.Management/tspconfig.yaml +++ b/specification/workloads/Workloads.SAPMonitor.Management/tspconfig.yaml @@ -10,8 +10,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/monitors/{version-status}/{version}/monitors.json" "@azure-tools/typespec-ts": experimental-extensible-enums: true diff --git a/specification/workloads/Workloads.SAPVirtualInstance.Management/back-compatible.tsp b/specification/workloads/Workloads.SAPVirtualInstance.Management/back-compatible.tsp index b3399529fff7..acfcbc865753 100644 --- a/specification/workloads/Workloads.SAPVirtualInstance.Management/back-compatible.tsp +++ b/specification/workloads/Workloads.SAPVirtualInstance.Management/back-compatible.tsp @@ -1,7 +1,7 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; -namespace Microsoft.Workloads; +using Microsoft.Workloads; @@clientName(SAPVirtualInstances, "SapVirtualInstances", "autorest"); @@clientName(SAPDatabaseInstances, "SapDatabaseInstances", "autorest"); @@ -9,7 +9,24 @@ namespace Microsoft.Workloads; "SapCentralServerInstances", "autorest" ); +@@clientName(SAPApplicationServerInstance, + "SAPApplicationServerInstance", + "autorest" +); @@clientName(SAPApplicationServerInstances, "SapApplicationServerInstances", "autorest" ); + +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SAPApplicationServerInstance.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SAPCentralServerInstance.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SAPVirtualInstance.properties, + "autorest" +); +@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SAPDatabaseInstance.properties, + "autorest" +); diff --git a/specification/workloads/Workloads.SAPVirtualInstance.Management/tspconfig.yaml b/specification/workloads/Workloads.SAPVirtualInstance.Management/tspconfig.yaml index 5375fe705d1e..898cd6f81738 100644 --- a/specification/workloads/Workloads.SAPVirtualInstance.Management/tspconfig.yaml +++ b/specification/workloads/Workloads.SAPVirtualInstance.Management/tspconfig.yaml @@ -10,8 +10,6 @@ options: emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" emit-common-types-schema: "never" - # `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag - arm-resource-flattening: true output-file: "{azure-resource-provider-folder}/{service-name}/SAPVirtualInstance/{version-status}/{version}/SAPVirtualInstance.json" "@azure-tools/typespec-csharp": emitter-output-dir: "{output-dir}/sdk/workloadssapvirtualinstance/{namespace}"