Skip to content

Commit 649baf1

Browse files
authored
Merge pull request #48 from kpetremann/docs_redirect
feat(endpoints): /docs redirect
2 parents 8efd167 + 7c373ca commit 649baf1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/api/router/manager.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ func (m *Manager) ListenAndServe(ctx context.Context, address string, port int,
150150
if handler, err := swaggerHandler(api); err != nil {
151151
panic(fmt.Sprintf("failed to bootstrap Swagger UI: %s", err)) // this should never happen
152152
} else {
153+
mux.Handle("GET /docs", http.RedirectHandler("/swagger-ui", http.StatusMovedPermanently))
153154
mux.Handle("GET /swagger-ui", handler)
154155
mux.Handle("GET /swagger-ui/", handler)
155156
}

0 commit comments

Comments
 (0)