Skip to content

Commit 5acd000

Browse files
domdomeggclaude
andauthored
Add redirect from root path to Swagger UI documentation (#223)
## 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 <[email protected]>
1 parent bdda82a commit 5acd000

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/api/router/router.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,10 @@ func New(cfg *config.Config, registry service.RegistryService, authService auth.
1616
// Register routes for all API versions
1717
RegisterV0Routes(mux, cfg, registry, authService)
1818

19+
// Redirect root to Swagger UI
20+
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
21+
http.Redirect(w, r, "/v0/swagger/index.html", http.StatusFound)
22+
})
23+
1924
return mux
2025
}

0 commit comments

Comments
 (0)