Alerting: Fix API specification (#42282)
* Alerting: Fix API specification
This commit is contained in:
@@ -138,12 +138,15 @@ type MultiStatus struct{}
|
||||
// swagger:parameters RoutePostTestReceivers
|
||||
type TestReceiversConfigParams struct {
|
||||
// in:body
|
||||
Alert *TestReceiversConfigAlertParams `yaml:"alert,omitempty" json:"alert,omitempty"`
|
||||
// in:body
|
||||
Receivers []*PostableApiReceiver `yaml:"receivers,omitempty" json:"receivers,omitempty"`
|
||||
Body TestReceiversConfigBodyParams
|
||||
}
|
||||
|
||||
func (c *TestReceiversConfigParams) ProcessConfig(encrypt EncryptFn) error {
|
||||
type TestReceiversConfigBodyParams struct {
|
||||
Alert *TestReceiversConfigAlertParams `yaml:"alert,omitempty" json:"alert,omitempty"`
|
||||
Receivers []*PostableApiReceiver `yaml:"receivers,omitempty" json:"receivers,omitempty"`
|
||||
}
|
||||
|
||||
func (c *TestReceiversConfigBodyParams) ProcessConfig(encrypt EncryptFn) error {
|
||||
return processReceiverConfigs(c.Receivers, encrypt)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Grafana Alerting API.
|
||||
//
|
||||
// Package definitions includes the types required for generating or consuming an OpenAPI
|
||||
// spec for the Unified Alerting API.
|
||||
// Documentation of the API.
|
||||
// spec for the Grafana Alerting API.
|
||||
//
|
||||
//
|
||||
// Schemes: http, https
|
||||
// BasePath: /api/v1
|
||||
|
||||
Reference in New Issue
Block a user