ngalert openapi: Use same basePath as rest of Grafana (#79025)

* ngalert openapi: Use same `basePath` as rest of Grafana
Currently, there are two issues that prevent easily merging `ngalert` and grafana openapi specs:
- The basePath is different. `grafana` has `/api` and `ngalert` has `/api/v1`. I changed `ngalert` to use `/api`
- The `ngalert` endpoints have their basePath in the each operation path. The basePath should actually be omitted
---------

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
Julien Duchesne
2024-01-17 11:53:16 -05:00
committed by GitHub
co-authored by Yuriy Tseretyan
parent dce9d1e87c
commit c9211fbd69
22 changed files with 2639 additions and 2586 deletions
@@ -13,7 +13,7 @@ import (
"github.com/prometheus/prometheus/promql"
)
// swagger:route Post /api/v1/rule/test/grafana testing RouteTestRuleGrafanaConfig
// swagger:route Post /v1/rule/test/grafana testing RouteTestRuleGrafanaConfig
//
// Test a rule against Grafana ruler
//
@@ -28,7 +28,7 @@ import (
// 400: ValidationError
// 404: NotFound
// swagger:route Post /api/v1/rule/test/{DatasourceUID} testing RouteTestRuleConfig
// swagger:route Post /v1/rule/test/{DatasourceUID} testing RouteTestRuleConfig
//
// Test a rule against external data source ruler
//
@@ -42,7 +42,7 @@ import (
// 200: TestRuleResponse
// 404: NotFound
// swagger:route Post /api/v1/eval testing RouteEvalQueries
// swagger:route Post /v1/eval testing RouteEvalQueries
//
// Test rule
//
@@ -55,7 +55,7 @@ import (
// Responses:
// 200: EvalQueriesResponse
// swagger:route Post /api/v1/rule/backtest testing BacktestConfig
// swagger:route Post /v1/rule/backtest testing BacktestConfig
//
// Test rule
//