From 5acd00024fc46c666244895758f634d57ed26e7f Mon Sep 17 00:00:00 2001 From: adam jones Date: Wed, 6 Aug 2025 14:11:21 +0100 Subject: [PATCH] Add redirect from root path to Swagger UI documentation (#223) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Added redirect from `/` to `/v0/swagger/index.html` to help contributors quickly access API documentation - Implemented the redirect in router.go after v0 routes registration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- internal/api/router/router.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/api/router/router.go b/internal/api/router/router.go index 9f17880..dad7264 100644 --- a/internal/api/router/router.go +++ b/internal/api/router/router.go @@ -16,5 +16,10 @@ func New(cfg *config.Config, registry service.RegistryService, authService auth. // Register routes for all API versions RegisterV0Routes(mux, cfg, registry, authService) + // Redirect root to Swagger UI + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + http.Redirect(w, r, "/v0/swagger/index.html", http.StatusFound) + }) + return mux }