➕ add swagger
This commit is contained in:
13
router/modules/swagger_router.go
Normal file
13
router/modules/swagger_router.go
Normal 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))
|
||||
}
|
Reference in New Issue
Block a user