Add echo-swagger/v2 for Echo v5 compatibility
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user