Alerting: Fix API specification (#42282)

* Alerting: Fix API specification
This commit is contained in:
Sofia Papagiannaki
2021-11-30 20:55:54 +01:00
committed by GitHub
parent 1d4b2593ec
commit 9c7b52fd36
10 changed files with 459 additions and 62 deletions
@@ -31,7 +31,7 @@ type AlertmanagerApiService interface {
RouteGetSilences(*models.ReqContext) response.Response
RoutePostAMAlerts(*models.ReqContext, apimodels.PostableAlerts) response.Response
RoutePostAlertingConfig(*models.ReqContext, apimodels.PostableUserConfig) response.Response
RoutePostTestReceivers(*models.ReqContext, apimodels.TestReceiversConfigParams) response.Response
RoutePostTestReceivers(*models.ReqContext, apimodels.TestReceiversConfigBodyParams) response.Response
}
func (api *API) RegisterAlertmanagerApiEndpoints(srv AlertmanagerApiService, m *metrics.API) {
@@ -140,7 +140,7 @@ func (api *API) RegisterAlertmanagerApiEndpoints(srv AlertmanagerApiService, m *
)
group.Post(
toMacaronPath("/api/alertmanager/{Recipient}/config/api/v1/receivers/test"),
binding.Bind(apimodels.TestReceiversConfigParams{}),
binding.Bind(apimodels.TestReceiversConfigBodyParams{}),
metrics.Instrument(
http.MethodPost,
"/api/alertmanager/{Recipient}/config/api/v1/receivers/test",