Skip to content

Commit 4b00173

Browse files
authored
Revert "Update the Nginx Typespec (#36473)" (#36508)
This reverts commit fd14567.
1 parent 98c8aa1 commit 4b00173

File tree

227 files changed

+527
-2591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+527
-2591
lines changed

specification/nginx/Nginx.Management/ApiKeys.tsp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using Rest;
77
using Http;
88
using Azure.ResourceManager;
99

10-
namespace Nginx.NginxPlus;
10+
namespace NGINX.NGINXPLUS;
1111

1212
/**
1313
* API key resource returned by the service.
@@ -44,7 +44,7 @@ model ApiKeyResponseProperties {
4444
/**
4545
* Expiry of the key in UTC date-time format.
4646
*/
47-
endDateTime?: string;
47+
endDateTime: string;
4848
}
4949

5050
/**
@@ -61,7 +61,7 @@ model ApiKeyRequestProperties {
6161
/**
6262
* Expiry of the key in UTC date-time format.
6363
*/
64-
endDateTime?: string;
64+
endDateTime: string;
6565
}
6666

6767
/**

specification/nginx/Nginx.Management/Certificates.tsp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ import "@azure-tools/typespec-azure-resource-manager";
66
using Rest;
77
using Azure.ResourceManager;
88

9-
namespace Nginx.NginxPlus;
9+
namespace NGINX.NGINXPLUS;
1010

1111
/** NginxCertificate resource */
1212
@parentResource(NginxDeployment)
1313
model Certificate is ProxyResource<NginxCertificateProperties> {
1414
...ResourceNameParameter<Certificate>;
15-
16-
/** Gets or sets the location. */
17-
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property"
18-
location?: string;
1915
}
2016

2117
/**
@@ -41,7 +37,7 @@ model NginxCertificateProperties {
4137
/**
4238
* The Key Vault secret ID. Example: `https://myvault.vault.azure.net/secrets/mysecret/1234567890abcdef1234567890abcdef`.
4339
*/
44-
keyVaultSecretId?: string;
40+
keyVaultSecretId?: url;
4541

4642
/**
4743
* The SHA1 thumbprint of the certificate.

specification/nginx/Nginx.Management/Configurations.tsp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using Rest;
77
using Http;
88
using Azure.ResourceManager;
99

10-
namespace Nginx.NginxPlus;
10+
namespace NGINX.NGINXPLUS;
1111

1212
/**
1313
* Represents an Nginx configuration resource.
@@ -160,9 +160,9 @@ model NginxConfigurationRequestProperties {
160160
}
161161

162162
/**
163-
* The request body for creating an analysis for an Nginx configuration.
163+
* The request body for creating an analysis for an NGINX configuration.
164164
*/
165-
@doc("The request body for creating an analysis for an Nginx configuration.")
165+
@doc("The request body for creating an analysis for an NGINX configuration.")
166166
model AnalysisCreate {
167167
/**
168168
* Configuration details for analysis.
@@ -175,7 +175,7 @@ model AnalysisCreate {
175175
*/
176176
model AnalysisConfig {
177177
/**
178-
* The root file of the Nginx config file(s). It must match one of the files' filepath.
178+
* The root file of the NGINX config file(s). It must match one of the files' filepath.
179179
*/
180180
rootFile?: string;
181181

@@ -228,7 +228,7 @@ model AnalysisResultContent {
228228
}
229229

230230
/**
231-
* An error object found during the analysis of an Nginx configuration.
231+
* An error object found during the analysis of an NGINX configuration.
232232
*/
233233
model AnalysisDiagnostic {
234234
/**
@@ -268,7 +268,7 @@ model AnalysisDiagnostic {
268268
}
269269

270270
/**
271-
* A diagnostic is a message associated with an Nginx config. The Analyzer returns diagnostics with a level indicating the importance of the diagnostic with optional category.
271+
* A diagnostic is a message associated with an NGINX config. The Analyzer returns diagnostics with a level indicating the importance of the diagnostic with optional category.
272272
*/
273273
model DiagnosticItem {
274274
/**

specification/nginx/Nginx.Management/NginxDeployments.tsp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,20 @@ using Rest;
77
using Http;
88
using Azure.ResourceManager;
99

10-
namespace Nginx.NginxPlus;
10+
namespace NGINX.NGINXPLUS;
1111

1212
/**
1313
* Represents an Nginx deployment resource.
1414
*/
15-
#suppress "@azure-tools/typespec-azure-core/no-private-usage"
16-
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance"
17-
@Azure.ResourceManager.Private.armResourceInternal(NginxDeploymentProperties)
18-
@TypeSpec.Http.Private.includeInapplicableMetadataInPayload(false)
19-
model NginxDeployment extends Foundations.TrackedResource {
15+
model NginxDeployment is TrackedResource<NginxDeploymentProperties> {
2016
/** The name of the Nginx deployment resource. */
2117
@pattern("^([a-z0-9A-Z][a-z0-9A-Z-]{0,28}[a-z0-9A-Z]|[a-z0-9A-Z])$")
22-
@key("deploymentName")
18+
@key("nginxDeploymentName")
2319
@segment("nginxDeployments")
2420
@path
2521
name: string;
2622

2723
...ManagedServiceIdentityProperty;
28-
29-
/** The resource-specific properties for this resource. */
30-
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property"
31-
properties?: NginxDeploymentProperties;
32-
3324
...ResourceSkuProperty;
3425
}
3526

@@ -177,7 +168,7 @@ model NginxDeploymentProperties {
177168
/**
178169
* Whether diagnostics support is enabled.
179170
*/
180-
enableDiagnosticsSupport?: boolean;
171+
enableDiagnosticsSupport: boolean;
181172

182173
/**
183174
* Logging configuration.

specification/nginx/Nginx.Management/WafPolicies.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import "@azure-tools/typespec-azure-resource-manager";
66
using Rest;
77
using Azure.ResourceManager;
88

9-
namespace Nginx.NginxPlus;
9+
namespace NGINX.NGINXPLUS;
1010

1111
/**
1212
* Represents a WAF policy resource under a given Nginx deployment.

specification/nginx/Nginx.Management/client.tsp

Lines changed: 15 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@ import "./main.tsp";
22
import "@azure-tools/typespec-client-generator-core";
33

44
using Azure.ClientGenerator.Core;
5-
using Nginx.NginxPlus;
5+
using NGINX.NGINXPLUS;
66

7-
@@clientName(Nginx.NginxPlus, "NginxManagementClient", "javascript");
7+
@@clientName(NGINX.NGINXPLUS, "NginxManagementClient", "javascript");
88

9-
// Model name overrides
10-
@@clientName(Certificate, "NginxCertificate");
11-
@@clientName(ApiKeyRequestProperties, "NginxDeploymentApiKeyRequestProperties");
9+
// Method name overrides
10+
@@clientName(Configurations.analyze, "analysis", "!csharp");
1211

12+
// Model name overrides
13+
@@clientName(Certificate, "NginxCertificate", "!csharp");
14+
@@clientName(ApiKey, "NginxDeploymentApiKeyResponse", "!csharp");
1315
@@clientName(ApiKeyResponseProperties,
1416
"NginxDeploymentApiKeyResponseProperties",
1517
"!csharp"
1618
);
17-
@@clientName(ApiKey, "NginxDeploymentApiKeyResponse", "!csharp");
1819
@@clientName(ApiKeyRequest, "NginxDeploymentApiKeyRequest", "!csharp");
19-
@@clientName(AnalysisConfig, "AnalysisCreateConfig", "!csharp");
20-
@@clientName(AnalysisResultContent, "AnalysisResultData", "!csharp");
20+
@@clientName(ApiKeyRequestProperties,
21+
"NginxDeploymentApiKeyRequestProperties",
22+
"!csharp"
23+
);
2124
@@clientName(Configuration, "NginxConfigurationResponse", "!csharp");
22-
@@clientName(DiagnosticLevel, "Level", "!csharp");
2325
@@clientName(NginxConfigurationProtectedFileResult,
2426
"NginxConfigurationProtectedFileResponse",
2527
"!csharp"
@@ -28,6 +30,9 @@ using Nginx.NginxPlus;
2830
"NginxConfigurationProtectedFileRequest",
2931
"!csharp"
3032
);
33+
@@clientName(AnalysisConfig, "AnalysisCreateConfig", "!csharp");
34+
@@clientName(AnalysisResultContent, "AnalysisResultData", "!csharp");
35+
@@clientName(DiagnosticLevel, "Level", "!csharp");
3136

3237
// CommonTypes
3338
@@clientName(Azure.ResourceManager.CommonTypes.ManagedServiceIdentity,
@@ -44,6 +49,7 @@ using Nginx.NginxPlus;
4449
);
4550
// Sku has many more properties than ResourceSku
4651
@@clientName(Azure.ResourceManager.CommonTypes.Sku, "ResourceSku", "!csharp");
52+
4753
// Anonymous model named by m4
4854
@@clientName(NginxAppProtect,
4955
"NginxDeploymentPropertiesNginxAppProtect",
@@ -69,8 +75,6 @@ using Nginx.NginxPlus;
6975
"!csharp"
7076
);
7177

72-
// Method name overrides
73-
@@clientName(Configurations.analyze, "analysis", "!csharp");
7478
// Client name for list operations
7579
@@clientName(NginxDeployments.listBySubscription, "list", "!csharp");
7680
@@clientName(ApiKeys.listByDeployment, "list", "!csharp");
@@ -110,63 +114,3 @@ using Nginx.NginxPlus;
110114
"privateIpAllocationMethod",
111115
"java"
112116
);
113-
114-
@@alternateType(Certificate.location, Azure.Core.azureLocation, "csharp");
115-
@@alternateType(NginxNetworkInterfaceConfiguration.subnetId,
116-
Azure.Core.armResourceIdentifier,
117-
"csharp"
118-
);
119-
@@alternateType(NginxPrivateIPAddress.privateIPAddress,
120-
Azure.Core.ipV4Address,
121-
"csharp"
122-
);
123-
@@alternateType(NginxPrivateIPAddress.subnetId,
124-
Azure.Core.armResourceIdentifier,
125-
"csharp"
126-
);
127-
@@alternateType(NginxCertificateProperties.keyVaultSecretCreated,
128-
utcDateTime,
129-
"csharp"
130-
);
131-
@@alternateType(ApiKeyResponseProperties.endDateTime, utcDateTime, "csharp");
132-
@@alternateType(ApiKeyRequestProperties.endDateTime, utcDateTime, "csharp");
133-
@@clientName(ApiKeyResponseProperties,
134-
"NginxDeploymentApiKeyProperties",
135-
"csharp"
136-
);
137-
@@clientName(AnalysisCreate, "NginxAnalysisContent", "csharp");
138-
@@clientName(AnalysisConfig, "NginxAnalysisConfig", "csharp");
139-
@@clientName(NginxCertificateErrorResponseBody,
140-
"NginxCertificateError",
141-
"csharp"
142-
);
143-
@@clientName(ActivationState, "NginxWafActivationState", "csharp");
144-
@@clientName(AnalysisResultContent, "NginxAnalysisResultDetails", "csharp");
145-
@@clientName(DiagnosticLevel, "NginxDiagnosticLevel", "csharp");
146-
@@clientName(Configuration, "NginxConfiguration", "csharp");
147-
@@clientName(NginxConfigurationResponseProperties,
148-
"NginxConfigurationProperties",
149-
"csharp"
150-
);
151-
@@clientName(ApiKey, "NginxDeploymentApiKey", "csharp");
152-
@@clientName(NginxConfigurationRequestProperties,
153-
"NginxConfigurationCreateOrUpdateProperties",
154-
"csharp"
155-
);
156-
157-
@@clientName(AnalysisResult, "NginxAnalysisResult", "csharp");
158-
@@clientName(WafPolicy, "NginxDeploymentWafPolicy", "csharp");
159-
@@clientName(AnalysisDiagnostic, "NginxAnalysisDiagnostic", "csharp");
160-
@@clientName(DiagnosticItem, "NginxDiagnosticItem", "csharp");
161-
@@clientName(ProvisioningState, "NginxProvisioningState", "csharp");
162-
@@clientName(AutoScaleSettings, "NginxDeploymentAutoScaleSettings", "csharp");
163-
@@clientName(AutoUpgradeProfile, "NginxDeploymentAutoUpgradeProfile", "csharp");
164-
@@clientName(ScaleProfile, "NginxScaleProfile", "csharp");
165-
@@clientName(ScaleProfileCapacity, "NginxScaleProfileCapacity", "csharp");
166-
@@clientName(WebApplicationFirewallSettings, "NginxWafSettings", "csharp");
167-
@@clientName(WebApplicationFirewallStatus, "NginxWafStatus", "csharp");
168-
@@clientName(WebApplicationFirewallPackage, "NginxWafPackage", "csharp");
169-
@@clientName(WebApplicationFirewallComponentVersions,
170-
"NginxWafComponentVersions",
171-
"csharp"
172-
);

specification/nginx/Nginx.Management/examples/2025-03-01-preview/ApiKeys_CreateOrUpdate_MaximumSet_Gen.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-03-01-preview",
66
"subscriptionId": "333F7B80-063D-40E5-975B-6E3C3CAC8296",
77
"resourceGroupName": "rgopenapi",
8-
"deploymentName": "myDeployment",
8+
"nginxDeploymentName": "myDeployment",
99
"apiKeyName": "myApiKey",
1010
"resource": {
1111
"properties": {
@@ -21,7 +21,7 @@
2121
"hint": "my secret API key hint",
2222
"endDateTime": "2025-05-28T20:01:03.647Z"
2323
},
24-
"id": "/subscriptions/333F7B80-063D-40E5-975B-6E3C3CAC8296/resourceGroups/rgopenapi/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/apiKeys/otvmugiwezqyit",
24+
"id": "/subscriptions/333F7B80-063D-40E5-975B-6E3C3CAC8296/resourceGroups/rgopenapi/providers/NGINX.NGINXPLUS/nginxDeployments/myDeployment/apiKeys/otvmugiwezqyit",
2525
"name": "otvmugiwezqyit",
2626
"type": "ugslayxowhvlfgkfldbnbulh",
2727
"systemData": {
@@ -40,7 +40,7 @@
4040
"hint": "my secret API key hint",
4141
"endDateTime": "2025-05-28T20:01:03.647Z"
4242
},
43-
"id": "/subscriptions/333F7B80-063D-40E5-975B-6E3C3CAC8296/resourceGroups/rgopenapi/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/apiKeys/otvmugiwezqyit",
43+
"id": "/subscriptions/333F7B80-063D-40E5-975B-6E3C3CAC8296/resourceGroups/rgopenapi/providers/NGINX.NGINXPLUS/nginxDeployments/myDeployment/apiKeys/otvmugiwezqyit",
4444
"name": "otvmugiwezqyit",
4545
"type": "ugslayxowhvlfgkfldbnbulh",
4646
"systemData": {

specification/nginx/Nginx.Management/examples/2025-03-01-preview/ApiKeys_Delete_MaximumSet_Gen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-03-01-preview",
66
"subscriptionId": "333F7B80-063D-40E5-975B-6E3C3CAC8296",
77
"resourceGroupName": "rgopenapi",
8-
"deploymentName": "myDeployment",
8+
"nginxDeploymentName": "myDeployment",
99
"apiKeyName": "myApiKey"
1010
},
1111
"responses": {

specification/nginx/Nginx.Management/examples/2025-03-01-preview/ApiKeys_Get_MaximumSet_Gen.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-03-01-preview",
66
"subscriptionId": "333F7B80-063D-40E5-975B-6E3C3CAC8296",
77
"resourceGroupName": "rgopenapi",
8-
"deploymentName": "myDeployment",
8+
"nginxDeploymentName": "myDeployment",
99
"apiKeyName": "myApiKey"
1010
},
1111
"responses": {
@@ -15,7 +15,7 @@
1515
"hint": "my secret API key hint",
1616
"endDateTime": "2025-05-28T20:01:03.647Z"
1717
},
18-
"id": "/subscriptions/333F7B80-063D-40E5-975B-6E3C3CAC8296/resourceGroups/rgopenapi/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/apiKeys/otvmugiwezqyit",
18+
"id": "/subscriptions/333F7B80-063D-40E5-975B-6E3C3CAC8296/resourceGroups/rgopenapi/providers/NGINX.NGINXPLUS/nginxDeployments/myDeployment/apiKeys/otvmugiwezqyit",
1919
"name": "otvmugiwezqyit",
2020
"type": "ugslayxowhvlfgkfldbnbulh",
2121
"systemData": {

specification/nginx/Nginx.Management/examples/2025-03-01-preview/ApiKeys_ListByDeployment_MaximumSet_Gen.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"api-version": "2025-03-01-preview",
66
"subscriptionId": "333F7B80-063D-40E5-975B-6E3C3CAC8296",
77
"resourceGroupName": "rgopenapi",
8-
"deploymentName": "myDeployment"
8+
"nginxDeploymentName": "myDeployment"
99
},
1010
"responses": {
1111
"200": {
@@ -16,7 +16,7 @@
1616
"hint": "my secret API key hint",
1717
"endDateTime": "2025-05-28T20:01:03.647Z"
1818
},
19-
"id": "/subscriptions/333F7B80-063D-40E5-975B-6E3C3CAC8296/resourceGroups/rgopenapi/providers/Nginx.NginxPlus/nginxDeployments/myDeployment/apiKeys/otvmugiwezqyit",
19+
"id": "/subscriptions/333F7B80-063D-40E5-975B-6E3C3CAC8296/resourceGroups/rgopenapi/providers/NGINX.NGINXPLUS/nginxDeployments/myDeployment/apiKeys/otvmugiwezqyit",
2020
"name": "otvmugiwezqyit",
2121
"type": "ugslayxowhvlfgkfldbnbulh",
2222
"systemData": {

0 commit comments

Comments
 (0)