add swagger

This commit is contained in:
landaiqing
2024-08-05 15:44:33 +08:00
parent f629610d34
commit 9b36d2fff0
23 changed files with 725 additions and 28 deletions

View File

@@ -0,0 +1,13 @@
package modules
import (
"github.com/gin-gonic/gin"
swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
"schisandra-cloud-album/docs"
)
func SwaggerRouter(router *gin.Engine) {
docs.SwaggerInfo.BasePath = ""
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
}