From 7d69475bd0007aa1156e6ec96882436b7b13709d Mon Sep 17 00:00:00 2001 From: Shirley Jiang Date: Mon, 8 Feb 2021 16:38:01 -0800 Subject: [PATCH] Fix minor issues for AFDX public preview (#12798) * move systemdata to the end * update * revert unwanted change * ruleset & loganalytics changes * "collectionFormat": "multi" * fix model valiation * fix validation errors * Update readme.python.md * take 2 * take 3 * remove the lenient-model-deduplication fix as it didnt help Co-authored-by: Shirley Jiang --- .../Microsoft.Cdn/stable/2020-09-01/afdx.json | 121 ++++++++++++++---- .../Microsoft.Cdn/stable/2020-09-01/cdn.json | 15 +-- .../LogAnalytics_GetLogAnalyticsMetrics.json | 9 +- .../2020-09-01/examples/RuleSets_Create.json | 5 +- 4 files changed, 107 insertions(+), 43 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/afdx.json index 5cdbc7fe7366..e2979667b60f 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/afdx.json @@ -2165,15 +2165,6 @@ "required": true, "type": "string" }, - { - "name": "ruleSet", - "in": "body", - "description": "RuleSet properties", - "required": true, - "schema": { - "$ref": "#/definitions/RuleSet" - } - }, { "$ref": "#/parameters/subscriptionIdParameter" }, @@ -3355,6 +3346,7 @@ "name": "metrics", "type": "array", "required": true, + "collectionFormat": "multi", "in": "query", "items": { "type": "string", @@ -3365,7 +3357,11 @@ "originRequestTraffic", "originRequestBandwidth", "totalLatency" - ] + ], + "x-ms-enum": { + "name": "LogMetric", + "modelAsString": true + } } }, { @@ -3391,13 +3387,18 @@ "PT5M", "PT1H", "P1D" - ] + ], + "x-ms-enum": { + "name": "LogMetricsGranularity", + "modelAsString": true + } }, { "name": "groupBy", "in": "query", "type": "array", "required": false, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ @@ -3406,13 +3407,18 @@ "cacheStatus", "country", "customDomain" - ] + ], + "x-ms-enum": { + "name": "LogMetricsGroupBy", + "modelAsString": true + } } }, { "name": "continents", "type": "array", "in": "query", + "collectionFormat": "multi", "required": false, "items": { "type": "string" @@ -3422,6 +3428,7 @@ "name": "countryOrRegions", "type": "array", "in": "query", + "collectionFormat": "multi", "required": false, "items": { "type": "string" @@ -3430,7 +3437,8 @@ { "name": "customDomains", "type": "array", - "required": false, + "required": true, + "collectionFormat": "multi", "in": "query", "items": { "type": "string" @@ -3439,7 +3447,8 @@ { "name": "protocols", "type": "array", - "required": false, + "required": true, + "collectionFormat": "multi", "in": "query", "items": { "type": "string" @@ -3496,6 +3505,7 @@ "type": "array", "in": "query", "required": true, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ @@ -3504,7 +3514,11 @@ "browser", "userAgent", "countryOrRegion" - ] + ], + "x-ms-enum": { + "name": "LogRanking", + "modelAsString": true + } } }, { @@ -3512,15 +3526,21 @@ "type": "array", "in": "query", "required": true, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ "clientRequestCount", "clientRequestTraffic", - "clientRequestBandwidth", - "originRequestTraffic", - "originRequestBandwidth" - ] + "hitCount", + "missCount", + "userErrorCount", + "errorCount" + ], + "x-ms-enum": { + "name": "LogRankingMetric", + "modelAsString": true + } } }, { @@ -3549,6 +3569,7 @@ "type": "array", "in": "query", "required": false, + "collectionFormat": "multi", "items": { "type": "string" } @@ -3696,11 +3717,16 @@ "type": "array", "in": "query", "required": true, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ "clientRequestCount" - ] + ], + "x-ms-enum": { + "name": "WafMetric", + "modelAsString": true + } } }, { @@ -3726,13 +3752,18 @@ "PT5M", "PT1H", "P1D" - ] + ], + "x-ms-enum": { + "name": "WafGranularity", + "modelAsString": true + } }, { "name": "actions", "type": "array", "in": "query", "required": false, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ @@ -3740,7 +3771,11 @@ "block", "log", "redirect" - ] + ], + "x-ms-enum": { + "name": "WafAction", + "modelAsString": true + } } }, { @@ -3748,12 +3783,17 @@ "in": "query", "type": "array", "required": false, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ "httpStatusCode", "customDomain" - ] + ], + "x-ms-enum": { + "name": "WafRankingGroupBy", + "modelAsString": true + } } }, { @@ -3761,13 +3801,18 @@ "type": "array", "in": "query", "required": false, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ "managed", "custom", "bot" - ] + ], + "x-ms-enum": { + "name": "WafRuleType", + "modelAsString": true + } } } ], @@ -3821,11 +3866,16 @@ "type": "array", "in": "query", "required": true, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ "clientRequestCount" - ] + ], + "x-ms-enum": { + "name": "WafMetric", + "modelAsString": true + } } }, { @@ -3854,6 +3904,7 @@ "type": "array", "in": "query", "required": true, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ @@ -3865,7 +3916,11 @@ "url", "country", "ruleType" - ] + ], + "x-ms-enum": { + "name": "WafRankingType", + "modelAsString": true + } } }, { @@ -3873,6 +3928,7 @@ "type": "array", "in": "query", "required": false, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ @@ -3880,7 +3936,11 @@ "block", "log", "redirect" - ] + ], + "x-ms-enum": { + "name": "WafAction", + "modelAsString": true + } } }, { @@ -3888,13 +3948,18 @@ "type": "array", "in": "query", "required": false, + "collectionFormat": "multi", "items": { "type": "string", "enum": [ "managed", "custom", "bot" - ] + ], + "x-ms-enum": { + "name": "WafRuleType", + "modelAsString": true + } } } ], diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/cdn.json index b07b00ed44b2..6b5dd994036b 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/cdn.json @@ -5445,6 +5445,10 @@ "description": "Resource type.", "readOnly": true, "type": "string" + }, + "systemData": { + "$ref": "#/definitions/SystemData", + "readOnly": true } }, "x-ms-azure-resource": true @@ -5518,10 +5522,6 @@ "update" ], "description": "Resource tags." - }, - "systemData": { - "$ref": "#/definitions/SystemData", - "readOnly": true } }, "required": [ @@ -5535,12 +5535,7 @@ "$ref": "#/definitions/Resource" } ], - "properties": { - "systemData": { - "$ref": "#/definitions/SystemData", - "readOnly": true - } - } + "properties": {} }, "QueryStringCachingBehavior": { "description": "Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.", diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/examples/LogAnalytics_GetLogAnalyticsMetrics.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/examples/LogAnalytics_GetLogAnalyticsMetrics.json index 687e26fe1609..1f7f6fbea163 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/examples/LogAnalytics_GetLogAnalyticsMetrics.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/examples/LogAnalytics_GetLogAnalyticsMetrics.json @@ -8,7 +8,14 @@ "granularity": "PT5M", "groupBy": "protocol", "dateTimeBegin": "2020-11-04T04:30:00.000Z", - "dateTimeEnd": "2020-11-04T05:00:00.000Z" + "dateTimeEnd": "2020-11-04T05:00:00.000Z", + "customDomains": [ + "customdomain1.azurecdn.net", + "customdomain2.azurecdn.net" + ], + "protocols": [ + "https" + ] }, "responses": { "200": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/examples/RuleSets_Create.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/examples/RuleSets_Create.json index ea41f23ccdac..afc0fc5bd9d2 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/examples/RuleSets_Create.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/examples/RuleSets_Create.json @@ -4,10 +4,7 @@ "subscriptionId": "subid", "resourceGroupName": "RG", "profileName": "profile1", - "ruleSetName": "ruleSet1", - "ruleSet": { - "properties": {} - } + "ruleSetName": "ruleSet1" }, "responses": { "200": {