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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 523 additions and 277 deletions

View File

@ -31,7 +31,7 @@ func (f *TestingApiHandler) BacktestConfig(ctx *models.ReqContext) response.Resp
if err := web.Bind(ctx.Req, &conf); err != nil {
return response.Error(http.StatusBadRequest, "bad request data", err)
}
return f.handleBacktestingConfig(ctx, conf)
return f.handleBacktestConfig(ctx, conf)
}
func (f *TestingApiHandler) RouteEvalQueries(ctx *models.ReqContext) response.Response {
// Parse Request Body

View File

@ -29,6 +29,6 @@ func (f *TestingApiHandler) handleRouteEvalQueries(c *models.ReqContext, body ap
return f.svc.RouteEvalQueries(c, body)
}
func (f *TestingApiHandler) handleBacktestingConfig(ctx *models.ReqContext, conf apimodels.BacktestConfig) response.Response {
func (f *TestingApiHandler) handleBacktestConfig(ctx *models.ReqContext, conf apimodels.BacktestConfig) response.Response {
return f.svc.BacktestAlertRule(ctx, conf)
}

View File

@ -7,26 +7,6 @@
"Ack": {
"type": "object"
},
"AddCommand": {
"properties": {
"name": {
"type": "string"
},
"role": {
"enum": [
"Viewer",
"Editor",
"Admin"
],
"type": "string"
},
"secondsToLive": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"Alert": {
"properties": {
"activeAt": {
@ -191,9 +171,6 @@
},
"type": "object"
},
"AlertStateType": {
"type": "string"
},
"AlertingRule": {
"description": "adapted from cortex",
"properties": {
@ -452,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": {
@ -902,6 +901,12 @@
},
"GettableApiReceiver": {
"properties": {
"discord_configs": {
"items": {
"$ref": "#/definitions/DiscordConfig"
},
"type": "array"
},
"email_configs": {
"items": {
"$ref": "#/definitions/EmailConfig"
@ -960,6 +965,12 @@
},
"type": "array"
},
"webex_configs": {
"items": {
"$ref": "#/definitions/WebexConfig"
},
"type": "array"
},
"webhook_configs": {
"items": {
"$ref": "#/definitions/WebhookConfig"
@ -1025,7 +1036,7 @@
"type": "object"
},
"settings": {
"$ref": "#/definitions/Json"
"$ref": "#/definitions/RawMessage"
},
"type": {
"type": "string"
@ -1257,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"
},
@ -1298,6 +1315,9 @@
"oauth2": {
"$ref": "#/definitions/OAuth2"
},
"proxy_connect_header": {
"$ref": "#/definitions/Header"
},
"proxy_url": {
"$ref": "#/definitions/URL"
},
@ -1308,6 +1328,15 @@
"title": "HTTPClientConfig configures an HTTP client.",
"type": "object"
},
"Header": {
"additionalProperties": {
"items": {
"$ref": "#/definitions/Secret"
},
"type": "array"
},
"type": "object"
},
"HostPort": {
"properties": {
"Host": {
@ -1401,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"
@ -1772,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"
}
@ -1870,6 +1832,12 @@
},
"PostableApiReceiver": {
"properties": {
"discord_configs": {
"items": {
"$ref": "#/definitions/DiscordConfig"
},
"type": "array"
},
"email_configs": {
"items": {
"$ref": "#/definitions/EmailConfig"
@ -1928,6 +1896,12 @@
},
"type": "array"
},
"webex_configs": {
"items": {
"$ref": "#/definitions/WebexConfig"
},
"type": "array"
},
"webhook_configs": {
"items": {
"$ref": "#/definitions/WebhookConfig"
@ -1990,7 +1964,7 @@
"type": "object"
},
"settings": {
"$ref": "#/definitions/Json"
"$ref": "#/definitions/RawMessage"
},
"type": {
"type": "string"
@ -2276,6 +2250,9 @@
"token": {
"$ref": "#/definitions/Secret"
},
"token_file": {
"type": "string"
},
"url": {
"type": "string"
},
@ -2284,6 +2261,9 @@
},
"user_key": {
"$ref": "#/definitions/Secret"
},
"user_key_file": {
"type": "string"
}
},
"type": "object"
@ -2369,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"
@ -2423,6 +2412,12 @@
},
"type": "array"
},
"webex_configs": {
"items": {
"$ref": "#/definitions/WebexConfig"
},
"type": "array"
},
"webhook_configs": {
"items": {
"$ref": "#/definitions/WebhookConfig"
@ -2924,6 +2919,9 @@
"description": "The client key file for the targets.",
"type": "string"
},
"max_version": {
"$ref": "#/definitions/TLSVersion"
},
"min_version": {
"$ref": "#/definitions/TLSVersion"
},
@ -3157,6 +3155,7 @@
"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 RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
"properties": {
"ForceQuery": {
"type": "boolean"
@ -3192,7 +3191,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"title": "URL is a custom URL type that allows validation at configuration load time.",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"type": "object"
},
"Userinfo": {
@ -3231,7 +3230,7 @@
"$ref": "#/definitions/Secret"
},
"api_key_file": {
"$ref": "#/definitions/Secret"
"type": "string"
},
"api_url": {
"$ref": "#/definitions/URL"
@ -3271,6 +3270,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": {
@ -3348,7 +3368,6 @@
"type": "object"
},
"alertGroup": {
"description": "AlertGroup alert group",
"properties": {
"alerts": {
"description": "alerts",
@ -3592,6 +3611,7 @@
"type": "array"
},
"integration": {
"description": "Integration integration",
"properties": {
"lastNotifyAttempt": {
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
@ -3735,6 +3755,7 @@
"type": "array"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"properties": {
"comment": {
"description": "comment",
@ -3772,7 +3793,6 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"active": {
"description": "active",

View File

@ -176,6 +176,12 @@ type ResponseDetails struct {
Msg string `json:"msg"`
}
// swagger:parameters BacktestConfig
type BacktestConfigRequest struct {
// in:body
Body BacktestConfig
}
// swagger:model
type BacktestConfig struct {
From time.Time `json:"from"`

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"
],

View File

@ -2397,6 +2397,15 @@
"testing"
],
"operationId": "BacktestConfig",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/BacktestConfig"
}
}
],
"responses": {
"200": {
"description": "BacktestResult",
@ -2653,9 +2662,6 @@
}
}
},
"AlertStateType": {
"type": "string"
},
"AlertingRule": {
"description": "adapted from cortex",
"type": "object",
@ -2914,9 +2920,31 @@
}
},
"DataTopic": {
"description": "nolint:revive",
"type": "string",
"title": "DataTopic is used to identify which topic the frame should be assigned to."
},
"DiscordConfig": {
"type": "object",
"title": "DiscordConfig configures notifications via Discord.",
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string"
},
"send_resolved": {
"type": "boolean"
},
"title": {
"type": "string"
},
"webhook_url": {
"$ref": "#/definitions/SecretURL"
}
}
},
"DiscoveryBase": {
"type": "object",
"required": [
@ -3368,6 +3396,12 @@
"GettableApiReceiver": {
"type": "object",
"properties": {
"discord_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/DiscordConfig"
}
},
"email_configs": {
"type": "array",
"items": {
@ -3426,6 +3460,12 @@
"$ref": "#/definitions/VictorOpsConfig"
}
},
"webex_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebexConfig"
}
},
"webhook_configs": {
"type": "array",
"items": {
@ -3491,7 +3531,7 @@
}
},
"settings": {
"$ref": "#/definitions/Json"
"$ref": "#/definitions/RawMessage"
},
"type": {
"type": "string"
@ -3723,9 +3763,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"
},
@ -3765,6 +3811,9 @@
"oauth2": {
"$ref": "#/definitions/OAuth2"
},
"proxy_connect_header": {
"$ref": "#/definitions/Header"
},
"proxy_url": {
"$ref": "#/definitions/URL"
},
@ -3773,6 +3822,15 @@
}
}
},
"Header": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/Secret"
}
}
},
"HostPort": {
"type": "object",
"title": "HostPort represents a \"host:port\" network address.",
@ -3866,82 +3924,6 @@
"$ref": "#/definitions/Label"
}
},
"LegacyAlert": {
"type": "object",
"properties": {
"Created": {
"type": "string",
"format": "date-time"
},
"DashboardId": {
"type": "integer",
"format": "int64"
},
"EvalData": {
"$ref": "#/definitions/Json"
},
"ExecutionError": {
"type": "string"
},
"For": {
"$ref": "#/definitions/Duration"
},
"Frequency": {
"type": "integer",
"format": "int64"
},
"Handler": {
"type": "integer",
"format": "int64"
},
"Id": {
"type": "integer",
"format": "int64"
},
"Message": {
"type": "string"
},
"Name": {
"type": "string"
},
"NewStateDate": {
"type": "string",
"format": "date-time"
},
"OrgId": {
"type": "integer",
"format": "int64"
},
"PanelId": {
"type": "integer",
"format": "int64"
},
"Settings": {
"$ref": "#/definitions/Json"
},
"Severity": {
"type": "string"
},
"Silenced": {
"type": "boolean"
},
"State": {
"$ref": "#/definitions/AlertStateType"
},
"StateChanges": {
"type": "integer",
"format": "int64"
},
"Updated": {
"type": "string",
"format": "date-time"
},
"Version": {
"type": "integer",
"format": "int64"
}
}
},
"MatchRegexps": {
"type": "object",
"title": "MatchRegexps represents a map of Regexp.",
@ -4240,15 +4222,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"
}
@ -4337,6 +4328,12 @@
"PostableApiReceiver": {
"type": "object",
"properties": {
"discord_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/DiscordConfig"
}
},
"email_configs": {
"type": "array",
"items": {
@ -4395,6 +4392,12 @@
"$ref": "#/definitions/VictorOpsConfig"
}
},
"webex_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebexConfig"
}
},
"webhook_configs": {
"type": "array",
"items": {
@ -4457,7 +4460,7 @@
}
},
"settings": {
"$ref": "#/definitions/Json"
"$ref": "#/definitions/RawMessage"
},
"type": {
"type": "string"
@ -4743,6 +4746,9 @@
"token": {
"$ref": "#/definitions/Secret"
},
"token_file": {
"type": "string"
},
"url": {
"type": "string"
},
@ -4751,6 +4757,9 @@
},
"user_key": {
"$ref": "#/definitions/Secret"
},
"user_key_file": {
"type": "string"
}
}
},
@ -4835,10 +4844,19 @@
}
}
},
"RawMessage": {
"type": "object"
},
"Receiver": {
"type": "object",
"title": "Receiver configuration provides configuration on how to contact a receiver.",
"properties": {
"discord_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/DiscordConfig"
}
},
"email_configs": {
"type": "array",
"items": {
@ -4891,6 +4909,12 @@
"$ref": "#/definitions/VictorOpsConfig"
}
},
"webex_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebexConfig"
}
},
"webhook_configs": {
"type": "array",
"items": {
@ -5392,6 +5416,9 @@
"description": "The client key file for the targets.",
"type": "string"
},
"max_version": {
"$ref": "#/definitions/TLSVersion"
},
"min_version": {
"$ref": "#/definitions/TLSVersion"
},
@ -5699,7 +5726,7 @@
"$ref": "#/definitions/Secret"
},
"api_key_file": {
"$ref": "#/definitions/Secret"
"type": "string"
},
"api_url": {
"$ref": "#/definitions/URL"
@ -5737,6 +5764,27 @@
"type": "string",
"title": "VisType is used to indicate how the data should be visualized in explore."
},
"WebexConfig": {
"type": "object",
"title": "WebexConfig configures notifications via Webex.",
"properties": {
"api_url": {
"$ref": "#/definitions/URL"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string"
},
"room_id": {
"type": "string"
},
"send_resolved": {
"type": "boolean"
}
}
},
"WebhookConfig": {
"type": "object",
"title": "WebhookConfig configures notifications via a generic webhook.",
@ -5814,6 +5862,7 @@
}
},
"alertGroup": {
"description": "AlertGroup alert group",
"type": "object",
"required": [
"alerts",
@ -5838,6 +5887,7 @@
"$ref": "#/definitions/alertGroup"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"type": "array",
"items": {
"$ref": "#/definitions/alertGroup"
@ -6246,6 +6296,7 @@
"$ref": "#/definitions/postableSilence"
},
"receiver": {
"description": "Receiver receiver",
"type": "object",
"required": [
"active",

View File

@ -12740,6 +12740,27 @@
}
}
},
"DiscordConfig": {
"type": "object",
"title": "DiscordConfig configures notifications via Discord.",
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string"
},
"send_resolved": {
"type": "boolean"
},
"title": {
"type": "string"
},
"webhook_url": {
"$ref": "#/definitions/SecretURL"
}
}
},
"DiscoveryBase": {
"type": "object",
"required": [
@ -13369,6 +13390,12 @@
"GettableApiReceiver": {
"type": "object",
"properties": {
"discord_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/DiscordConfig"
}
},
"email_configs": {
"type": "array",
"items": {
@ -13427,6 +13454,12 @@
"$ref": "#/definitions/VictorOpsConfig"
}
},
"webex_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebexConfig"
}
},
"webhook_configs": {
"type": "array",
"items": {
@ -13492,7 +13525,7 @@
}
},
"settings": {
"$ref": "#/definitions/Json"
"$ref": "#/definitions/RawMessage"
},
"type": {
"type": "string"
@ -13724,9 +13757,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"
},
@ -13766,6 +13805,9 @@
"oauth2": {
"$ref": "#/definitions/OAuth2"
},
"proxy_connect_header": {
"$ref": "#/definitions/Header"
},
"proxy_url": {
"$ref": "#/definitions/URL"
},
@ -13774,6 +13816,15 @@
}
}
},
"Header": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/Secret"
}
}
},
"Hit": {
"type": "object",
"properties": {
@ -14928,15 +14979,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"
}
@ -15328,6 +15388,12 @@
"PostableApiReceiver": {
"type": "object",
"properties": {
"discord_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/DiscordConfig"
}
},
"email_configs": {
"type": "array",
"items": {
@ -15386,6 +15452,12 @@
"$ref": "#/definitions/VictorOpsConfig"
}
},
"webex_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebexConfig"
}
},
"webhook_configs": {
"type": "array",
"items": {
@ -15448,7 +15520,7 @@
}
},
"settings": {
"$ref": "#/definitions/Json"
"$ref": "#/definitions/RawMessage"
},
"type": {
"type": "string"
@ -15778,6 +15850,9 @@
"token": {
"$ref": "#/definitions/Secret"
},
"token_file": {
"type": "string"
},
"url": {
"type": "string"
},
@ -15786,6 +15861,9 @@
},
"user_key": {
"$ref": "#/definitions/Secret"
},
"user_key_file": {
"type": "string"
}
}
},
@ -16030,10 +16108,19 @@
}
}
},
"RawMessage": {
"type": "object"
},
"Receiver": {
"type": "object",
"title": "Receiver configuration provides configuration on how to contact a receiver.",
"properties": {
"discord_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/DiscordConfig"
}
},
"email_configs": {
"type": "array",
"items": {
@ -16086,6 +16173,12 @@
"$ref": "#/definitions/VictorOpsConfig"
}
},
"webex_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebexConfig"
}
},
"webhook_configs": {
"type": "array",
"items": {
@ -17156,6 +17249,9 @@
"description": "The client key file for the targets.",
"type": "string"
},
"max_version": {
"$ref": "#/definitions/TLSVersion"
},
"min_version": {
"$ref": "#/definitions/TLSVersion"
},
@ -17728,8 +17824,9 @@
"type": "string"
},
"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 RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
"type": "object",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"properties": {
"ForceQuery": {
"type": "boolean"
@ -18436,7 +18533,7 @@
"$ref": "#/definitions/Secret"
},
"api_key_file": {
"$ref": "#/definitions/Secret"
"type": "string"
},
"api_url": {
"$ref": "#/definitions/URL"
@ -18474,6 +18571,27 @@
"type": "string",
"title": "VisType is used to indicate how the data should be visualized in explore."
},
"WebexConfig": {
"type": "object",
"title": "WebexConfig configures notifications via Webex.",
"properties": {
"api_url": {
"$ref": "#/definitions/URL"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string"
},
"room_id": {
"type": "string"
},
"send_resolved": {
"type": "boolean"
}
}
},
"WebhookConfig": {
"type": "object",
"title": "WebhookConfig configures notifications via a generic webhook.",
@ -18551,7 +18669,6 @@
}
},
"alertGroup": {
"description": "AlertGroup alert group",
"type": "object",
"required": [
"alerts",
@ -18795,6 +18912,7 @@
}
},
"integration": {
"description": "Integration integration",
"type": "object",
"required": [
"name",
@ -18938,6 +19056,7 @@
}
},
"postableSilence": {
"description": "PostableSilence postable silence",
"type": "object",
"required": [
"comment",
@ -18975,7 +19094,6 @@
}
},
"receiver": {
"description": "Receiver receiver",
"type": "object",
"required": [
"active",