diff --git a/pkg/api/cortex-ruler.go b/pkg/api/cortex-ruler.go index 73080c31602..c3fff7aecae 100644 --- a/pkg/api/cortex-ruler.go +++ b/pkg/api/cortex-ruler.go @@ -157,6 +157,8 @@ type ExtendedUpsertAlertDefinitionCommand struct { NoDataState NoDataState `json:"no_data_state" yaml:"no_data_state"` ExecutionErrorState ExecutionErrorState `json:"exec_err_state" yaml:"exec_err_state"` Settings map[string]interface{} `json:"settings" yaml:"settings"` + // Receivers are optional and used for migrating notification channels of existing alerts + Receivers []string `json:"receivers" yaml:"receivers"` // internal state FolderUID string `json:"-" yaml:"-"` DatasourceUIDs []string `json:"-" yaml:"-"` diff --git a/spec.json b/spec.json index a32f89c593e..e877a10615d 100644 --- a/spec.json +++ b/spec.json @@ -1551,6 +1551,14 @@ ], "x-go-name": "NoDataState" }, + "receivers": { + "description": "Receivers are optional and used for migrating notification channels of existing alerts", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Receivers" + }, "settings": { "type": "object", "additionalProperties": { @@ -2754,8 +2762,9 @@ "x-go-package": "github.com/grafana/alerting-api/pkg/api" }, "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" @@ -2788,7 +2797,7 @@ "$ref": "#/definitions/Userinfo" } }, - "x-go-package": "github.com/prometheus/common/config" + "x-go-package": "net/url" }, "UpdateDashboardAclCommand": { "type": "object",