Add echo-swagger/v2 for Echo v5 compatibility

This commit is contained in:
2026-05-20 22:00:52 +02:00
parent 2cff8d16d7
commit b80ad90eab
3 changed files with 6 additions and 2 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ import (
"github.com/a-h/templ"
"github.com/labstack/echo/v5"
"github.com/labstack/echo/v5/middleware"
echoSwagger "github.com/swaggo/echo-swagger/v2"
)
// @Title MusicServer API
@@ -52,8 +53,8 @@ func (s *Server) RegisterRoutes() http.Handler {
e.Static("/", "/frontend")
// Swagger UI - TODO: Update for Echo v5
// e.GET("/swagger/*", echoSwagger.WrapHandler)
// Swagger UI
e.GET("/swagger/*", echoSwagger.WrapHandler)
index := NewIndexHandler()
e.GET("/version", index.GetVersion)