使用 swaggo/swag 为 Golang 项目生成 OpenAPI/Swagger 文档——注解注释(@Summary, @Param, @Success, @Router, @Security)、swag init 代码生成、框架集成(gin, echo, fiber, chi, net/http)、安全定义(Bearer/JWT, OAuth2, API key)以及结构体标签(swaggertype, enums, example, swaggerignore)。适用于在 Go 项目中添加或维护 Swagger/OpenAPI 文档,或当代码库导入了 github.com/swaggo/swag、github.com/swaggo/gin-swagger、github.com/swaggo/echo-swagger、github.com/swaggo/http-swagger 或 github.com/swaggo/files 时。
samber 获取