Alerting: Fix swagger specification (#49273)
* Alerting: fix specification * Update merged swagger specification
This commit is contained in:
@@ -29,9 +29,6 @@ type ValidationError struct {
|
||||
Msg string `json:"msg"`
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type Ack struct{}
|
||||
|
||||
type Backend int
|
||||
|
||||
const (
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 202: Accepted
|
||||
// 202: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route PUT /api/provisioning/contact-points/{ID} provisioning RoutePutContactpoint
|
||||
@@ -34,7 +34,7 @@ import (
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 202: Accepted
|
||||
// 202: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/provisioning/contact-points/{ID} provisioning RouteDeleteContactpoints
|
||||
@@ -45,9 +45,16 @@ import (
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 202: Accepted
|
||||
// 202: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:parameters RoutePutContactpoint RouteDeleteContactpoints
|
||||
type ContactPointUIDReference struct {
|
||||
// ContactPointUID should be the contact point UID identifier
|
||||
// in:path
|
||||
ID string
|
||||
}
|
||||
|
||||
// swagger:parameters RoutePostContactpoints RoutePutContactpoint
|
||||
type ContactPointPayload struct {
|
||||
// in:body
|
||||
|
||||
@@ -7,7 +7,7 @@ import prometheus "github.com/prometheus/alertmanager/config"
|
||||
// Get all the mute timings.
|
||||
//
|
||||
// Responses:
|
||||
// 200: []MuteTiming
|
||||
// 200: MuteTimings
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/provisioning/mute-timings/{name} provisioning RouteGetMuteTiming
|
||||
@@ -18,6 +18,17 @@ import prometheus "github.com/prometheus/alertmanager/config"
|
||||
// 200: MuteTiming
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:model
|
||||
type MuteTiming struct {
|
||||
prometheus.MuteTimeInterval
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type MuteTimings []MuteTiming
|
||||
|
||||
// swagger:parameters RouteGetTemplate RouteGetMuteTiming
|
||||
type RouteGetMuteTimingParam struct {
|
||||
// Template Name
|
||||
// in:path
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package definitions
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 202: Accepted
|
||||
// 202: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:parameters RoutePutPolicyTree
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
// Get all message templates.
|
||||
//
|
||||
// Responses:
|
||||
// 200: []MessageTemplate
|
||||
// 200: MessageTemplate
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/provisioning/templates/{name} provisioning RouteGetTemplate
|
||||
@@ -33,7 +33,7 @@ import (
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 202: Accepted
|
||||
// 202: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/provisioning/templates/{name} provisioning RouteDeleteTemplate
|
||||
@@ -41,14 +41,25 @@ import (
|
||||
// Delete a template.
|
||||
//
|
||||
// Responses:
|
||||
// 204: Accepted
|
||||
// 204: Ack
|
||||
|
||||
// swagger:parameters RouteGetTemplate RoutePutTemplate RouteDeleteTemplate
|
||||
type RouteGetTemplateParam struct {
|
||||
// Template Name
|
||||
// in:path
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type MessageTemplate struct {
|
||||
Name string
|
||||
Template string
|
||||
Provenance models.Provenance `json:"provenance,omitempty"`
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type MessageTemplates []MessageTemplate
|
||||
|
||||
type MessageTemplateContent struct {
|
||||
Template string
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
package definitions
|
||||
|
||||
// swagger:model
|
||||
type NotFound struct{}
|
||||
|
||||
// swagger:model
|
||||
type Ack struct{}
|
||||
|
||||
Reference in New Issue
Block a user