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 <noreply@anthropic.com>
This commit is contained in:
parent
bdda82ad3f
commit
5acd00024f
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue