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:
co-authored by
Yuriy Tseretyan
parent
dce9d1e87c
commit
c9211fbd69
@@ -47,6 +47,7 @@ func TestAuthorize(t *testing.T) {
|
||||
|
||||
t.Run("should not panic on known routes", func(t *testing.T) {
|
||||
for path, methods := range paths {
|
||||
path := swaggerSpec.Spec().BasePath + path
|
||||
for _, method := range methods {
|
||||
require.NotPanics(t, func() {
|
||||
api.authorize(method, path)
|
||||
|
||||
Reference in New Issue
Block a user