Discover Packages
github.com/Jetereting/swaggo
command
module
Version:
v1.0.2
Opens a new window with list of versions in this module.
Published: May 5, 2022
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Swaggo - v0.3.0
修改内容:
项目本身支持 go mod
支持使用本工具的项目是 go mod 项目,不用再放到 go path 下了
个性化支持了分页响应,例如 // @Success 200 []schema.DeviceQRCodeResult "{list:列表数据,pagination:{current:页索引,pageSize:页大小,total:总数量}}" 根据描述里含有 pagination 自动转化为分页结构体
About
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).
Quick Start Guide
Install
export GO111MODULE=on;
go install github.com/Jetereting/swaggo@vlatest
use
swaggo -s ./internal/app/smartpark/routers/wx/swagger.go -p . -o ./internal/app/smartpark/swagger/
Expand ▾
Collapse ▴
Documentation
¶
convert comments to swagger-api-doc
just support swagger-2.0
Source Files
¶
Directories
¶
@Version 1.0.0 @Title Swagger Example API @Description Swagger Example API @Host 127.0.0.1:3000 @BasePath /api @Name swagger @Contact
[email protected] @URL teambition.com @TermsOfServiceUrl http://teambition.com/ @License Apache @LicenseUrl http://teambition.com/ @Schemes http,wss @Consumes json,plain,xml,html @Produces json,plain,xml,html
@Version 1.0.0 @Title Swagger Example API @Description Swagger Example API @Host 127.0.0.1:3000 @BasePath /api @Name swagger @Contact [email protected] @URL teambition.com @TermsOfServiceUrl http://teambition.com/ @License Apache @LicenseUrl http://teambition.com/ @Schemes http,wss @Consumes json,plain,xml,html @Produces json,plain,xml,html
Click to show internal directories.
Click to hide internal directories.