Files
grafana/pkg/services/ngalert/api/tooling/definitions/api.go
Owen Diehl e065e19583 Fix/ngalert generation (#33172)
* fixes pkg names & alerting openapi generation

* cleans up api generation, uses docker & removes python
2021-04-20 13:12:32 -04:00

53 lines
884 B
Go

// Package definitions includes the types required for generating or consuming an OpenAPI
// spec for the Unified Alerting API.
// Documentation of the API.
//
// Schemes: http, https
// BasePath: /api/v1
// Version: 1.1.0
//
// Consumes:
// - application/json
//
// Produces:
// - application/json
//
// Security:
// - basic
//
// SecurityDefinitions:
// basic:
// type: basic
//
// swagger:meta
package definitions
// swagger:model
type ValidationError struct {
Msg string `json:"msg"`
}
// swagger:model
type Ack struct{}
type Backend int
const (
GrafanaBackend Backend = iota
AlertmanagerBackend
LoTexRulerBackend
)
func (b Backend) String() string {
switch b {
case GrafanaBackend:
return "grafana"
case AlertmanagerBackend:
return "alertmanager"
case LoTexRulerBackend:
return "lotex"
default:
return ""
}
}