Alerting: Use correct response body for silence post API (#57114)
This commit is contained in:
@@ -199,7 +199,7 @@ import (
|
||||
// create silence
|
||||
//
|
||||
// Responses:
|
||||
// 201: gettableSilence
|
||||
// 201: postSilencesOKBody
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route POST /api/alertmanager/{DatasourceUID}/api/v2/silences alertmanager RouteCreateSilence
|
||||
@@ -207,7 +207,7 @@ import (
|
||||
// create silence
|
||||
//
|
||||
// Responses:
|
||||
// 201: gettableSilence
|
||||
// 201: postSilencesOKBody
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
@@ -389,6 +389,12 @@ func NewGettableStatus(cfg *PostableApiAlertingConfig) *GettableStatus {
|
||||
// swagger:model postableSilence
|
||||
type PostableSilence = amv2.PostableSilence
|
||||
|
||||
// swagger:model postSilencesOKBody
|
||||
type PostSilencesOKBody struct { // vendored from "github.com/prometheus/alertmanager/api/v2/restapi/operations/silence/PostSilencesOKBody" because import brings too many other things
|
||||
// silence ID
|
||||
SilenceID string `json:"silenceID,omitempty"`
|
||||
}
|
||||
|
||||
// swagger:model gettableSilences
|
||||
type GettableSilences = amv2.GettableSilences
|
||||
|
||||
|
||||
Reference in New Issue
Block a user