Alerting: Fix API specification (#38753)

* Alerting: Fix API spec

* Add missing status codes
This commit is contained in:
Sofia Papagiannaki
2021-09-10 12:46:02 +03:00
committed by GitHub
parent 9173898fd6
commit 7af329f385
7 changed files with 148 additions and 206 deletions

View File

@@ -21,7 +21,6 @@ import (
type TestingApiService interface {
RouteEvalQueries(*models.ReqContext, apimodels.EvalQueriesPayload) response.Response
RouteTestReceiverConfig(*models.ReqContext, apimodels.ExtendedReceiver) response.Response
RouteTestRuleConfig(*models.ReqContext, apimodels.TestRulePayload) response.Response
}
@@ -37,16 +36,6 @@ func (api *API) RegisterTestingApiEndpoints(srv TestingApiService, m *metrics.Me
m,
),
)
group.Post(
toMacaronPath("/api/v1/receiver/test/{Recipient}"),
binding.Bind(apimodels.ExtendedReceiver{}),
metrics.Instrument(
http.MethodPost,
"/api/v1/receiver/test/{Recipient}",
srv.RouteTestReceiverConfig,
m,
),
)
group.Post(
toMacaronPath("/api/v1/rule/test/{Recipient}"),
binding.Bind(apimodels.TestRulePayload{}),