From 68ebc705420fb39d5c9ca536411106ddb0eab1be Mon Sep 17 00:00:00 2001 From: Gregory Chris Date: Tue, 5 Jan 2021 16:25:18 +0200 Subject: [PATCH 1/9] fixed lint - make provider pascal case https://portal.azure-devex-tools.com/amekpis/linting/detail?errorId=00977335-6FD1-4DCF-8CD0-96F194252EED --- .../stable/2016-03-01/alertRules_API.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json index 0f5f7a89919c..f3ca2b14769d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json @@ -36,7 +36,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}": { "put": { "description": "Creates or updates a classic metric alert rule.", "tags": [ @@ -213,7 +213,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules": { "get": { "tags": [ "AlertRules" @@ -249,7 +249,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/alertrules": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules": { "get": { "tags": [ "AlertRules" From 05fe682cb46627df534cbb59ceaa540835d73dca Mon Sep 17 00:00:00 2001 From: Gregory Chris Date: Tue, 5 Jan 2021 16:41:58 +0200 Subject: [PATCH 2/9] fixed default response https://portal.azure-devex-tools.com/amekpis/linting/detail?errorId=3A0A2C18-E2AB-4671-B50E-A79865800B41 --- .../stable/2016-03-01/alertRules_API.json | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json index f3ca2b14769d..cdb189963fb0 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json @@ -118,6 +118,11 @@ }, "200": { "description": "Successful request to delete an alert rule" + }, + "default": { + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -152,6 +157,11 @@ "schema": { "$ref": "#/definitions/AlertRuleResource" } + }, + "default": { + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -237,6 +247,11 @@ "schema": { "$ref": "#/definitions/AlertRuleResourceCollection" } + }, + "default": { + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-pageable": { @@ -270,6 +285,11 @@ "schema": { "$ref": "#/definitions/AlertRuleResourceCollection" } + }, + "default": { + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-pageable": { From cc413145f4908e6fcfd736679b0c9c4b628c7fae Mon Sep 17 00:00:00 2001 From: Gregory Chris Date: Wed, 13 Jan 2021 15:31:15 +0200 Subject: [PATCH 3/9] added suppress info for R4007 --- specification/monitor/resource-manager/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 89ad698475e8..7d91049a1500 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -618,6 +618,9 @@ directive: from: dataCollectionRuleAssociations_API.json where: $.paths reason: 'Operations API is defined in a separate swagger spec for Microsoft.Insights namespace (https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json)' + - suppress: R4007 + from: alertRules_API.json + reason: 'Updating the error response to the new format would be a breaking change' ``` ### Tag: profile-hybrid-2019-03-01 From 941b16163c0488c7bc90162a1537fb35f73c9545 Mon Sep 17 00:00:00 2001 From: Gregory Chris Date: Wed, 13 Jan 2021 16:33:59 +0200 Subject: [PATCH 4/9] removed extra line --- specification/monitor/resource-manager/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index e29349560217..2d2d91fe284e 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -602,7 +602,6 @@ directive: - suppress: R4007 from: alertRules_API.json reason: 'Updating the error response to the new format would be a breaking change' - ``` ### Tag: profile-hybrid-2019-03-01 From 76ea62f144564904d5ae3613fc882207290463dc Mon Sep 17 00:00:00 2001 From: Gregory Chris Date: Thu, 14 Jan 2021 11:41:58 +0200 Subject: [PATCH 5/9] change the place of a default --- .../stable/2016-03-01/alertRules_API.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json index 8b23607e8607..532ccbccec38 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json @@ -197,12 +197,6 @@ } ], "responses": { - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, "200": { "description": "Successful request to update an alert rule", "schema": { @@ -214,6 +208,12 @@ "schema": { "$ref": "#/definitions/AlertRuleResource" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { From 677ebad7e2a316b0a32722a40bdddcd91d86102d Mon Sep 17 00:00:00 2001 From: Gregory Chris Date: Thu, 14 Jan 2021 12:00:55 +0200 Subject: [PATCH 6/9] added description to few default responses --- .../Microsoft.Insights/stable/2016-03-01/alertRules_API.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json index 532ccbccec38..bebf3d9d1c0c 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/alertRules_API.json @@ -120,6 +120,7 @@ "description": "Successful request to delete an alert rule" }, "default": { + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -159,6 +160,7 @@ } }, "default": { + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -249,6 +251,7 @@ } }, "default": { + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -287,6 +290,7 @@ } }, "default": { + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } From 4d17ca09b27d4244572bea41087d502c000fbd8b Mon Sep 17 00:00:00 2001 From: Gregory Chris Date: Sun, 17 Jan 2021 11:04:45 +0200 Subject: [PATCH 7/9] added suppression on additional properties --- specification/monitor/resource-manager/readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 2d2d91fe284e..e6a7d37b3edc 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -599,9 +599,10 @@ directive: - suppress: R4007 from: metricBaselines_API.json reason: 'Updating the error response to the new format would be a breaking change.' - - suppress: R4007 + - suppress: OBJECT_ADDITIONAL_PROPERTIES from: alertRules_API.json - reason: 'Updating the error response to the new format would be a breaking change' + where: $.definitions.AlertRuleResource + reason: 'Action is expected to receive a subclass of Resource' ``` ### Tag: profile-hybrid-2019-03-01 From 45ecf6395de62528070be59e39832162affd12ea Mon Sep 17 00:00:00 2001 From: Gregory Chris Date: Sun, 17 Jan 2021 11:57:31 +0200 Subject: [PATCH 8/9] added suppress on error schema --- specification/monitor/resource-manager/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index e6a7d37b3edc..41d12e922535 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -599,6 +599,9 @@ directive: - suppress: R4007 from: metricBaselines_API.json reason: 'Updating the error response to the new format would be a breaking change.' + - suppress: R4007 + from: alertRules_API.json + reason: 'Updating the error response to the new format would be a breaking change.' - suppress: OBJECT_ADDITIONAL_PROPERTIES from: alertRules_API.json where: $.definitions.AlertRuleResource From 871c3520abe22adc72b6bf97615e436fe3203f04 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 18 Jan 2021 09:49:35 +0800 Subject: [PATCH 9/9] Update readme.md --- specification/monitor/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index aa78b1d1f382..14f9381db5db 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -609,6 +609,7 @@ directive: - suppress: OBJECT_ADDITIONAL_PROPERTIES from: metricAlert_API.json where: $.definitions.MetricAlertResource + reason: 'Action is expected to receive a subclass of Resource' ``` ### Tag: profile-hybrid-2019-03-01