feat: add openapi

This commit is contained in:
engigu
2026-03-05 20:19:35 +08:00
parent a8a24a410c
commit 9fec4ecdb5
15 changed files with 3447 additions and 22 deletions
+21
View File
@@ -7,8 +7,29 @@ import (
"github.com/engigu/baihu-panel/cmd"
"github.com/engigu/baihu-panel/internal/bootstrap"
"github.com/engigu/baihu-panel/internal/constant"
_ "github.com/engigu/baihu-panel/docs" // This will be generated by swag init
)
// @title Baihu Panel API
// @version 1.0
// @description Baihu Panel API Server documentation.
// @termsOfService http://swagger.io/terms/
// @contact.name API Support
// @contact.url http://www.swagger.io/support
// @contact.email support@swagger.io
// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @host localhost:8052
// @BasePath /api/v1
// @query.collection.format multi
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
func printHelp() {
fmt.Println("Usage: baihu <command> [arguments]")
fmt.Println("Available commands:")