Skip to content

Commit b98ebeb

Browse files
authored
[JS] Exclude JS flatten for services that have already been released (#39459)
* exclude-js-flatten * update * Update back-compatible.tsp for legacy usage
1 parent 2035ed8 commit b98ebeb

File tree

9 files changed

+120
-72
lines changed

9 files changed

+120
-72
lines changed

specification/chaos/resource-manager/Microsoft.Chaos/Chaos/client.tsp

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,33 @@ using Microsoft.Chaos;
5252

5353
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "property flatten for SDK backward compatibility"
5454
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
55-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Experiment.properties);
55+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Experiment.properties,
56+
"!javascript"
57+
);
5658
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "property flatten for SDK backward compatibility"
5759
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
58-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExperimentExecution.properties
60+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExperimentExecution.properties,
61+
"!javascript"
5962
);
6063
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "property flatten for SDK backward compatibility"
6164
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
62-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(TargetType.properties);
65+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(TargetType.properties,
66+
"!javascript"
67+
);
6368
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "property flatten for SDK backward compatibility"
6469
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
65-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Capability.properties);
70+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Capability.properties,
71+
"!javascript"
72+
);
6673
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "property flatten for SDK backward compatibility"
6774
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
68-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CapabilityType.properties);
75+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CapabilityType.properties,
76+
"!javascript"
77+
);
6978
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "property flatten for SDK backward compatibility"
7079
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
71-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExperimentExecutionDetails.properties
80+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ExperimentExecutionDetails.properties,
81+
"!javascript"
7282
);
7383

7484
@@clientName(Microsoft.Chaos.Operations.list, "listAll", "javascript,python");

specification/codesigning/CodeSigning.Management/back-compatible.tsp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,24 @@ using Microsoft.CodeSigning;
55

66
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
77
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
8-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CertificateProfile.properties
8+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CertificateProfile.properties,
9+
"!javascript"
910
);
1011

1112
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
1213
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
13-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CodeSigningAccount.properties
14+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CodeSigningAccount.properties,
15+
"!javascript"
1416
);
1517

1618
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
1719
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
18-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CodeSigningAccountPatch.properties
20+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CodeSigningAccountPatch.properties,
21+
"!javascript"
1922
);
2023

2124
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
2225
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
23-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Certificate.revocation);
26+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(Certificate.revocation,
27+
"!javascript"
28+
);

specification/dashboard/Dashboard.Management/back-compatible.tsp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ using Azure.Core;
1313

1414
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
1515
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
16-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateEndpointConnection.properties
16+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateEndpointConnection.properties,
17+
"!javascript"
1718
);
1819

1920
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
2021
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
21-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateLinkResource.properties
22+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateLinkResource.properties,
23+
"!javascript"
2224
);
2325

2426
@@clientName(ManagedPrivateEndpointModels.create::parameters.resource,
@@ -29,7 +31,8 @@ using Azure.Core;
2931
);
3032
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
3133
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
32-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ManagedPrivateEndpointModel.properties
34+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ManagedPrivateEndpointModel.properties,
35+
"!javascript"
3336
);
3437

3538
@@clientName(IntegrationFabrics.create::parameters.resource,
@@ -48,7 +51,8 @@ using Azure.Core;
4851
@@clientName(PrivateEndpointConnections.approve::parameters.resource, "body");
4952
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
5053
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
51-
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ManagedDashboard.properties
54+
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(ManagedDashboard.properties,
55+
"!javascript"
5256
);
5357
@@alternateType(ManagedPrivateEndpointModelProperties.privateLinkResourceId,
5458
armResourceIdentifier

specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/HardwareSecurityModules/back-compatible.tsp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using Microsoft.HardwareSecurityModules;
66
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
77
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
88
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(BackupResult.properties,
9-
"!python,!java,!csharp"
9+
"!python,!java,!csharp,!javascript"
1010
);
1111
@@clientName(Error.innererror, "innerError");
1212
@@clientName(CloudHsmClusters.createOrUpdate::parameters.resource, "body");
@@ -17,22 +17,22 @@ using Microsoft.HardwareSecurityModules;
1717
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
1818
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
1919
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(CloudHsmCluster.properties,
20-
"!python,!java,!csharp"
20+
"!python,!java,!csharp,!javascript"
2121
);
2222
@@clientName(PrivateEndpointConnections.create::parameters.resource,
2323
"properties"
2424
);
2525
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
2626
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
2727
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(PrivateEndpointConnection.properties,
28-
"!python,!java,!csharp"
28+
"!python,!java,!csharp,!javascript"
2929
);
3030
@@clientName(DedicatedHsms.createOrUpdate::parameters.resource, "parameters");
3131
@@clientName(DedicatedHsms.update::parameters.properties, "parameters");
3232
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
3333
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility"
3434
@@Azure.ClientGenerator.Core.Legacy.flattenProperty(DedicatedHsm.properties,
35-
"!python,!java,!csharp"
35+
"!python,!java,!csharp,!javascript"
3636
);
3737
@@clientName(CloudHsmClusters.validateBackupProperties::parameters.body,
3838
"backupRequestProperties",

specification/netapp/resource-manager/Microsoft.NetApp/NetApp/back-compatible.tsp

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,61 @@ using Azure.ClientGenerator.Core.Legacy;
55
using Microsoft.NetApp;
66

77
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
8-
@@flattenProperty(Operation.properties);
8+
@@flattenProperty(Operation.properties, "!javascript");
99

1010
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
11-
@@flattenProperty(UsageResult.properties);
11+
@@flattenProperty(UsageResult.properties, "!javascript");
1212

1313
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
14-
@@flattenProperty(NetAppAccountPatch.properties);
14+
@@flattenProperty(NetAppAccountPatch.properties, "!javascript");
1515

1616
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
17-
@@flattenProperty(GetKeyVaultStatusResponse.properties);
17+
@@flattenProperty(GetKeyVaultStatusResponse.properties, "!javascript");
1818

1919
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
20-
@@flattenProperty(CapacityPoolPatch.properties);
20+
@@flattenProperty(CapacityPoolPatch.properties, "!javascript");
2121

2222
@@clientName(ExportPolicyRule.kerberos5iReadOnly, "kerberos5IReadOnly");
2323
@@clientName(ExportPolicyRule.kerberos5iReadWrite, "kerberos5IReadWrite");
2424
@@clientName(ExportPolicyRule.kerberos5pReadOnly, "kerberos5PReadOnly");
2525
@@clientName(ExportPolicyRule.kerberos5pReadWrite, "kerberos5PReadWrite");
2626

2727
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
28-
@@flattenProperty(VolumePatch.properties);
28+
@@flattenProperty(VolumePatch.properties, "!javascript");
2929

3030
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
31-
@@flattenProperty(SnapshotPolicyPatch.properties);
31+
@@flattenProperty(SnapshotPolicyPatch.properties, "!javascript");
3232

3333
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
34-
@@flattenProperty(BackupPolicyPatch.properties);
34+
@@flattenProperty(BackupPolicyPatch.properties, "!javascript");
3535

3636
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
37-
@@flattenProperty(VolumeQuotaRulePatch.properties);
37+
@@flattenProperty(VolumeQuotaRulePatch.properties, "!javascript");
3838

3939
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
40-
@@flattenProperty(VolumeGroup.properties);
40+
@@flattenProperty(VolumeGroup.properties, "!javascript");
4141

4242
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
43-
@@flattenProperty(VolumeGroupVolumeProperties.properties);
43+
@@flattenProperty(VolumeGroupVolumeProperties.properties, "!javascript");
4444

4545
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
46-
@@flattenProperty(SubvolumePatchRequest.properties);
46+
@@flattenProperty(SubvolumePatchRequest.properties, "!javascript");
4747

4848
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
49-
@@flattenProperty(SubvolumeModel.properties);
49+
@@flattenProperty(SubvolumeModel.properties, "!javascript");
5050

5151
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
52-
@@flattenProperty(BackupPatch.properties);
52+
@@flattenProperty(BackupPatch.properties, "!javascript");
5353

5454
@@clientLocation(SubscriptionQuotaItems.get, "NetAppResourceQuotaLimits");
5555
@@clientLocation(SubscriptionQuotaItems.list, "NetAppResourceQuotaLimits");
5656
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
57-
@@flattenProperty(QuotaItem.properties);
57+
@@flattenProperty(QuotaItem.properties, "!javascript");
5858

5959
@@clientLocation(RegionInfoResources.get, "NetAppResourceRegionInfos");
6060
@@clientLocation(RegionInfoResources.list, "NetAppResourceRegionInfos");
6161
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
62-
@@flattenProperty(RegionInfoResource.properties);
62+
@@flattenProperty(RegionInfoResource.properties, "!javascript");
6363

6464
@@clientLocation(NetAppAccounts.get, "Accounts");
6565
@@clientLocation(NetAppAccounts.createOrUpdate, "Accounts");
@@ -76,7 +76,7 @@ using Microsoft.NetApp;
7676
@@clientLocation(NetAppAccounts.listByNetAppAccount, VolumeGroups);
7777
@@clientLocation(NetAppAccounts.migrateBackups, "BackupsUnderAccount");
7878
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
79-
@@flattenProperty(NetAppAccount.properties);
79+
@@flattenProperty(NetAppAccount.properties, "!javascript");
8080

8181
@@clientLocation(CapacityPools.get, "Pools");
8282
@@clientLocation(CapacityPools.createOrUpdate, "Pools");
@@ -86,39 +86,39 @@ using Microsoft.NetApp;
8686
@@clientLocation(CapacityPools.delete, "Pools");
8787
@@clientLocation(CapacityPools.list, "Pools");
8888
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
89-
@@flattenProperty(CapacityPool.properties);
89+
@@flattenProperty(CapacityPool.properties, "!javascript");
9090

9191
@@clientName(Volumes.createOrUpdate::parameters.resource, "body");
9292
@@clientName(Volumes.update::parameters.properties, "body");
9393
@@clientLocation(Volumes.getLatestStatus, Backups);
9494
@@clientLocation(Volumes.getVolumeLatestRestoreStatus, Backups);
9595
@@clientLocation(Volumes.migrateBackups, "BackupsUnderVolume");
9696
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
97-
@@flattenProperty(Volume.properties);
97+
@@flattenProperty(Volume.properties, "!javascript");
9898

9999
@@clientName(Snapshots.create::parameters.resource, "body");
100100
@@clientName(Snapshots.update::parameters.properties, "body");
101101
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
102-
@@flattenProperty(Snapshot.properties);
102+
@@flattenProperty(Snapshot.properties, "!javascript");
103103

104104
@@clientName(SnapshotPolicies.create::parameters.resource, "body");
105105
@@clientName(SnapshotPolicies.update::parameters.properties, "body");
106106
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
107-
@@flattenProperty(SnapshotPolicy.properties);
107+
@@flattenProperty(SnapshotPolicy.properties, "!javascript");
108108

109109
@@clientName(BackupPolicies.create::parameters.resource, "body");
110110
@@clientName(BackupPolicies.update::parameters.properties, "body");
111111
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
112-
@@flattenProperty(BackupPolicy.properties);
112+
@@flattenProperty(BackupPolicy.properties, "!javascript");
113113

114114
@@clientName(VolumeQuotaRules.create::parameters.resource, "body");
115115
@@clientName(VolumeQuotaRules.update::parameters.properties, "body");
116116
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
117-
@@flattenProperty(VolumeQuotaRule.properties);
117+
@@flattenProperty(VolumeQuotaRule.properties, "!javascript");
118118

119119
@@clientName(VolumeGroups.create::parameters.resource, "body");
120120
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
121-
@@flattenProperty(VolumeGroupDetails.properties);
121+
@@flattenProperty(VolumeGroupDetails.properties, "!javascript");
122122

123123
@@clientLocation(SubvolumeInfos.get, "Subvolumes");
124124
@@clientLocation(SubvolumeInfos.create, "Subvolumes");
@@ -129,25 +129,25 @@ using Microsoft.NetApp;
129129
@@clientLocation(SubvolumeInfos.listByVolume, "Subvolumes");
130130
@@clientLocation(SubvolumeInfos.getMetadata, "Subvolumes");
131131
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
132-
@@flattenProperty(SubvolumeInfo.properties);
132+
@@flattenProperty(SubvolumeInfo.properties, "!javascript");
133133

134134
@@clientName(Backups.create::parameters.resource, "body");
135135
@@clientName(Backups.update::parameters.properties, "body");
136136
@@clientLocation(Backups.restoreFiles, "BackupsUnderBackupVault");
137137
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
138-
@@flattenProperty(Backup.properties);
138+
@@flattenProperty(Backup.properties, "!javascript");
139139

140140
@@clientName(BackupVaults.createOrUpdate::parameters.resource, "body");
141141
@@clientName(BackupVaults.update::parameters.properties, "body");
142142
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
143-
@@flattenProperty(BackupVault.properties);
143+
@@flattenProperty(BackupVault.properties, "!javascript");
144144

145145
@@clientName(Buckets.createOrUpdate::parameters.resource, "body");
146146
@@clientName(Buckets.update::parameters.properties, "body");
147147
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
148-
@@flattenProperty(Bucket.properties);
148+
@@flattenProperty(Bucket.properties, "!javascript");
149149
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "For backward compatibility"
150-
@@flattenProperty(BucketPatch.properties);
150+
@@flattenProperty(BucketPatch.properties, "!javascript");
151151

152152
@@clientLocation(NetAppResourceOperationGroup.checkNameAvailability,
153153
"NetAppResource"

0 commit comments

Comments
 (0)