Skip to content

Commit

Permalink
Dev monitor microsoft.insights 2016 03 01 (Azure#12413)
Browse files Browse the repository at this point in the history
* 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 <sgchris@gmail.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
  • Loading branch information
3 people authored and mkarmark committed Jul 20, 2021
1 parent 3c8c66c commit ebc7f76
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -152,6 +158,12 @@
"schema": {
"$ref": "#/definitions/AlertRuleResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
Expand Down Expand Up @@ -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": {
Expand All @@ -204,6 +210,12 @@
"schema": {
"$ref": "#/definitions/AlertRuleResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
Expand All @@ -213,7 +225,7 @@
}
}
},
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules": {
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules": {
"get": {
"tags": [
"AlertRules"
Expand All @@ -237,6 +249,12 @@
"schema": {
"$ref": "#/definitions/AlertRuleResourceCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
Expand All @@ -249,7 +267,7 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/microsoft.insights/alertrules": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules": {
"get": {
"tags": [
"AlertRules"
Expand All @@ -270,6 +288,12 @@
"schema": {
"$ref": "#/definitions/AlertRuleResourceCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
Expand Down
7 changes: 7 additions & 0 deletions specification/monitor/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ebc7f76

Please sign in to comment.