Alerting: Re-generate swagger definitions (#62154)

Regenerate swagger, add body binding so parameters work
This commit is contained in:
Alexander Weaver
2023-01-25 15:01:42 -06:00
committed by GitHub
parent 4a1d418157
commit eb1293ebb1
7 changed files with 523 additions and 277 deletions
+133 -82
View File
@@ -171,9 +171,6 @@
},
"type": "object"
},
"AlertStateType": {
"type": "string"
},
"AlertingRule": {
"description": "adapted from cortex",
"properties": {
@@ -432,9 +429,31 @@
"type": "object"
},
"DataTopic": {
"description": "nolint:revive",
"title": "DataTopic is used to identify which topic the frame should be assigned to.",
"type": "string"
},
"DiscordConfig": {
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string"
},
"send_resolved": {
"type": "boolean"
},
"title": {
"type": "string"
},
"webhook_url": {
"$ref": "#/definitions/SecretURL"
}
},
"title": "DiscordConfig configures notifications via Discord.",
"type": "object"
},
"DiscoveryBase": {
"properties": {
"error": {
@@ -882,6 +901,12 @@
},
"GettableApiReceiver": {
"properties": {
"discord_configs": {
"items": {
"$ref": "#/definitions/DiscordConfig"
},
"type": "array"
},
"email_configs": {
"items": {
"$ref": "#/definitions/EmailConfig"
@@ -940,6 +965,12 @@
},
"type": "array"
},
"webex_configs": {
"items": {
"$ref": "#/definitions/WebexConfig"
},
"type": "array"
},
"webhook_configs": {
"items": {
"$ref": "#/definitions/WebhookConfig"
@@ -1005,7 +1036,7 @@
"type": "object"
},
"settings": {
"$ref": "#/definitions/Json"
"$ref": "#/definitions/RawMessage"
},
"type": {
"type": "string"
@@ -1237,9 +1268,15 @@
"victorops_api_key": {
"$ref": "#/definitions/Secret"
},
"victorops_api_key_file": {
"type": "string"
},
"victorops_api_url": {
"$ref": "#/definitions/URL"
},
"webex_api_url": {
"$ref": "#/definitions/URL"
},
"wechat_api_corp_id": {
"type": "string"
},
@@ -1278,6 +1315,9 @@
"oauth2": {
"$ref": "#/definitions/OAuth2"
},
"proxy_connect_header": {
"$ref": "#/definitions/Header"
},
"proxy_url": {
"$ref": "#/definitions/URL"
},
@@ -1288,6 +1328,15 @@
"title": "HTTPClientConfig configures an HTTP client.",
"type": "object"
},
"Header": {
"additionalProperties": {
"items": {
"$ref": "#/definitions/Secret"
},
"type": "array"
},
"type": "object"
},
"HostPort": {
"properties": {
"Host": {
@@ -1381,82 +1430,6 @@
},
"type": "array"
},
"LegacyAlert": {
"properties": {
"Created": {
"format": "date-time",
"type": "string"
},
"DashboardId": {
"format": "int64",
"type": "integer"
},
"EvalData": {
"$ref": "#/definitions/Json"
},
"ExecutionError": {
"type": "string"
},
"For": {
"$ref": "#/definitions/Duration"
},
"Frequency": {
"format": "int64",
"type": "integer"
},
"Handler": {
"format": "int64",
"type": "integer"
},
"Id": {
"format": "int64",
"type": "integer"
},
"Message": {
"type": "string"
},
"Name": {
"type": "string"
},
"NewStateDate": {
"format": "date-time",
"type": "string"
},
"OrgId": {
"format": "int64",
"type": "integer"
},
"PanelId": {
"format": "int64",
"type": "integer"
},
"Settings": {
"$ref": "#/definitions/Json"
},
"Severity": {
"type": "string"
},
"Silenced": {
"type": "boolean"
},
"State": {
"$ref": "#/definitions/AlertStateType"
},
"StateChanges": {
"format": "int64",
"type": "integer"
},
"Updated": {
"format": "date-time",
"type": "string"
},
"Version": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"MatchRegexps": {
"additionalProperties": {
"$ref": "#/definitions/Regexp"
@@ -1752,15 +1725,24 @@
"routing_key": {
"$ref": "#/definitions/Secret"
},
"routing_key_file": {
"type": "string"
},
"send_resolved": {
"type": "boolean"
},
"service_key": {
"$ref": "#/definitions/Secret"
},
"service_key_file": {
"type": "string"
},
"severity": {
"type": "string"
},
"source": {
"type": "string"
},
"url": {
"$ref": "#/definitions/URL"
}
@@ -1850,6 +1832,12 @@
},
"PostableApiReceiver": {
"properties": {
"discord_configs": {
"items": {
"$ref": "#/definitions/DiscordConfig"
},
"type": "array"
},
"email_configs": {
"items": {
"$ref": "#/definitions/EmailConfig"
@@ -1908,6 +1896,12 @@
},
"type": "array"
},
"webex_configs": {
"items": {
"$ref": "#/definitions/WebexConfig"
},
"type": "array"
},
"webhook_configs": {
"items": {
"$ref": "#/definitions/WebhookConfig"
@@ -1970,7 +1964,7 @@
"type": "object"
},
"settings": {
"$ref": "#/definitions/Json"
"$ref": "#/definitions/RawMessage"
},
"type": {
"type": "string"
@@ -2256,6 +2250,9 @@
"token": {
"$ref": "#/definitions/Secret"
},
"token_file": {
"type": "string"
},
"url": {
"type": "string"
},
@@ -2264,6 +2261,9 @@
},
"user_key": {
"$ref": "#/definitions/Secret"
},
"user_key_file": {
"type": "string"
}
},
"type": "object"
@@ -2349,8 +2349,17 @@
"title": "QueryStat is used for storing arbitrary statistics metadata related to a query and its result, e.g. total request time, data processing time.",
"type": "object"
},
"RawMessage": {
"type": "object"
},
"Receiver": {
"properties": {
"discord_configs": {
"items": {
"$ref": "#/definitions/DiscordConfig"
},
"type": "array"
},
"email_configs": {
"items": {
"$ref": "#/definitions/EmailConfig"
@@ -2403,6 +2412,12 @@
},
"type": "array"
},
"webex_configs": {
"items": {
"$ref": "#/definitions/WebexConfig"
},
"type": "array"
},
"webhook_configs": {
"items": {
"$ref": "#/definitions/WebhookConfig"
@@ -2904,6 +2919,9 @@
"description": "The client key file for the targets.",
"type": "string"
},
"max_version": {
"$ref": "#/definitions/TLSVersion"
},
"min_version": {
"$ref": "#/definitions/TLSVersion"
},
@@ -3211,7 +3229,7 @@
"$ref": "#/definitions/Secret"
},
"api_key_file": {
"$ref": "#/definitions/Secret"
"type": "string"
},
"api_url": {
"$ref": "#/definitions/URL"
@@ -3251,6 +3269,27 @@
"title": "VisType is used to indicate how the data should be visualized in explore.",
"type": "string"
},
"WebexConfig": {
"properties": {
"api_url": {
"$ref": "#/definitions/URL"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string"
},
"room_id": {
"type": "string"
},
"send_resolved": {
"type": "boolean"
}
},
"title": "WebexConfig configures notifications via Webex.",
"type": "object"
},
"WebhookConfig": {
"properties": {
"http_config": {
@@ -3328,6 +3367,7 @@
"type": "object"
},
"alertGroup": {
"description": "AlertGroup alert group",
"properties": {
"alerts": {
"description": "alerts",
@@ -3351,6 +3391,7 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/definitions/alertGroup"
},
@@ -3752,6 +3793,7 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"active": {
"description": "active",
@@ -6222,6 +6264,15 @@
],
"description": "Test rule",
"operationId": "BacktestConfig",
"parameters": [
{
"in": "body",
"name": "Body",
"schema": {
"$ref": "#/definitions/BacktestConfig"
}
}
],
"produces": [
"application/json"
],