Alerting: Improve openAPI specification and docs for export endpoints (#85008)

This commit is contained in:
Yuri Tseretyan
2024-03-22 12:25:27 -04:00
committed by GitHub
parent e9db9106c1
commit e138ae3eb9
13 changed files with 731 additions and 83 deletions
+80 -11
View File
@@ -4176,7 +4176,6 @@
"type": "object"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the EscapedPath method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
"properties": {
"ForceQuery": {
"type": "boolean"
@@ -4212,7 +4211,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"title": "A URL represents a parsed URL (technically, a URI reference).",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"type": "object"
},
"UpdateRuleGroupResponse": {
@@ -4442,6 +4441,7 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/definitions/alertGroup"
},
@@ -4807,6 +4807,7 @@
"type": "array"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"properties": {
"comment": {
"description": "comment",
@@ -4844,7 +4845,6 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"active": {
"description": "active",
@@ -5032,7 +5032,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@@ -5059,6 +5064,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@@ -5189,7 +5201,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@@ -5205,7 +5222,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
@@ -5300,7 +5319,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@@ -5319,6 +5343,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@@ -5545,7 +5576,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@@ -5566,7 +5602,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
@@ -5653,12 +5691,24 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@@ -5793,7 +5843,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@@ -5806,6 +5861,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@@ -5903,6 +5965,13 @@
"/v1/provisioning/policies/export": {
"get": {
"operationId": "RouteGetPolicyTreeExport",
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",