From 12a1dc80b3f8101c3250dd894fae7f0e690dbb52 Mon Sep 17 00:00:00 2001 From: grchris-microsoft <76813672+grchris-microsoft@users.noreply.github.com> Date: Mon, 18 Jan 2021 04:06:56 +0200 Subject: [PATCH] Dev monitor microsoft.insights 2016 03 01 (#12413) * fixed lint - make provider pascal case https://portal.azure-devex-tools.com/amekpis/linting/detail?errorId=00977335-6FD1-4DCF-8CD0-96F194252EED * fixed default response https://portal.azure-devex-tools.com/amekpis/linting/detail?errorId=3A0A2C18-E2AB-4671-B50E-A79865800B41 * added suppress info for R4007 * removed extra line * change the place of a default * added description to few default responses * added suppression on additional properties * added suppress on error schema * Update readme.md Co-authored-by: Gregory Chris Co-authored-by: Weidong Xu --- .../stable/2016-03-01/alertRules_API.json | 42 +++++++++++++++---- .../monitor/resource-manager/readme.md | 7 ++++ 2 files changed, 40 insertions(+), 9 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 0e7576026b5d..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 @@ -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": [ @@ -118,6 +118,12 @@ }, "200": { "description": "Successful request to delete an alert rule" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -152,6 +158,12 @@ "schema": { "$ref": "#/definitions/AlertRuleResource" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -187,12 +199,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": { @@ -204,6 +210,12 @@ "schema": { "$ref": "#/definitions/AlertRuleResource" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -213,7 +225,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules": { "get": { "tags": [ "AlertRules" @@ -237,6 +249,12 @@ "schema": { "$ref": "#/definitions/AlertRuleResourceCollection" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-pageable": { @@ -249,7 +267,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/alertrules": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules": { "get": { "tags": [ "AlertRules" @@ -270,6 +288,12 @@ "schema": { "$ref": "#/definitions/AlertRuleResourceCollection" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-pageable": { diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index c49b8742f138..14f9381db5db 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -599,6 +599,13 @@ 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 + reason: 'Action is expected to receive a subclass of Resource' - suppress: OBJECT_ADDITIONAL_PROPERTIES from: metricAlert_API.json where: $.definitions.MetricAlertResource