API: Enable serving Swagger UI by default and add docs and guidelines (#63489)

* Enable serving Swagger UI by default

It used to be served behind the `swaggerUi` feature toggle.

* Remove `swaggerUi` feature toggle

* Add docs and guidelines for updating swagger

* Apply suggestions from code review

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
This commit is contained in:
Sofia Papagiannaki
2023-03-01 16:36:37 +02:00
committed by GitHub
parent fbd049a094
commit 8aae7be4e5
8 changed files with 91 additions and 15 deletions
+2 -4
View File
@@ -218,10 +218,8 @@ 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)
r.Get("/openapi3", openapi3)
}
r.Get("/swagger-ui", swaggerUI)
r.Get("/openapi3", openapi3)
// authed api
r.Group("/api", func(apiRoute routing.RouteRegister) {