mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 10:17:05 +08:00
API: Extract OpenAPI specification from source code using go-swagger (#40528)
* API: Using go-swagger for extracting OpenAPI specification from source code * Merge Grafana Alerting spec * Include enterprise endpoints (if enabled) * Serve SwaggerUI under feature flag * Fix building dev docker images * Configure swaggerUI * Add missing json tags Co-authored-by: Ying WANG <ying.wang@grafana.com> Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:

committed by
GitHub

parent
9c2363ef08
commit
35fe58de37
@ -140,6 +140,10 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
// expose plugin file system assets
|
||||
r.Get("/public/plugins/:pluginId/*", hs.getPluginAssets)
|
||||
|
||||
if hs.Features.IsEnabled(featuremgmt.FlagSwaggerUi) {
|
||||
r.Get("/swagger-ui", swaggerUI)
|
||||
}
|
||||
|
||||
// authed api
|
||||
r.Group("/api", func(apiRoute routing.RouteRegister) {
|
||||
// user (signed in)
|
||||
|
Reference in New Issue
Block a user