mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 03:19:30 +08:00
Implementing OpenApi 3 specs (converted from Swagger 2) (#53243)
* Adding OpenApi target to makefile, to covert swagger spec into OpenAPI 3 * Adding endpoint to server swaggerui with new openapi3 specs * Passing output file as parameter for OpenApi3 specs * Implement workaround for missing host and prefix domain
This commit is contained in:
@ -187,6 +187,7 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
|
||||
if hs.Features.IsEnabled(featuremgmt.FlagSwaggerUi) {
|
||||
r.Get("/swagger-ui", swaggerUI)
|
||||
r.Get("/openapi3", openapi3)
|
||||
}
|
||||
|
||||
// authed api
|
||||
|
11
pkg/api/openapi3.go
Normal file
11
pkg/api/openapi3.go
Normal file
@ -0,0 +1,11 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
func openapi3(c *models.ReqContext) {
|
||||
c.HTML(http.StatusOK, "openapi3", nil)
|
||||
}
|
Reference in New Issue
Block a user