Swaggo
- 支持了项目本身为 go mod
- 支持了使用本工具的项目是 go mod 项目,不用再放到 go path 下了
- 个性化支持了分页响应,例如
// @Success 200 []schema.DeviceQRCodeResult "{list:列表数据,pagination:{current:页索引,pageSize:页大小,total:总数量}}" 根据描述里含有 pagination 自动转化为分页结构体
Generate API documentation from annotations in Go code. It's always used for you Go server application. The swagger file accords to the Swagger Spec and displays it using Swagger UI(this project dosn't provide).
export GO111MODULE=on;
go install github.com/Jetereting/swaggo@latestswaggo -s ./internal/app/smartpark/routers/wx/swagger.go -p . -o ./internal/app/smartpark/swagger/