feat: integrated swagger
This commit is contained in:
@@ -6,6 +6,10 @@ import (
|
||||
"easywish/config"
|
||||
"easywish/internal/logger"
|
||||
"easywish/internal/routes"
|
||||
|
||||
docs "easywish/docs"
|
||||
swaggerfiles "github.com/swaggo/files"
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -18,6 +22,10 @@ func main() {
|
||||
|
||||
r := gin.Default()
|
||||
r = routes.SetupRoutes(r)
|
||||
|
||||
docs.SwaggerInfo.BasePath = "/api/"
|
||||
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler))
|
||||
|
||||
r.Run(":8080")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user