Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>go-swaggerNew to Visual Studio Code? Get it now.
go-swagger

go-swagger

skip1

|
19,001 installs
| (0) | Free
a golang swagger
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

go-swagger README

config swagger

default config

// @Summary 登录
// @Description 登录
// @Produce json
// @Param body body controllers.LoginParams true "body参数"
// @Success 200 {string} string "ok" "返回用户信息"
// @Failure 400 {string} string "err_code:10002 参数错误; err_code:10003 校验错误"
// @Failure 401 {string} string "err_code:10001 登录失败"
// @Failure 500 {string} string "err_code:20001 服务错误;err_code:20002 接口错误;err_code:20003 无数据错误;err_code:20004 数据库异常;err_code:20005 缓存异常"
// @Router /user/person/login [post

change config

{
    "swagger.tpl":"// @Summary 登录\n// @Description 登录\n// @Produce json\n// @Param body body controllers.LoginParams true \"body参数\"\n// @Success 200 {string} string \"ok\" \"返回用户信息\"\n// @Failure 400 {string} string \"err_code:10002 参数错误; err_code:10003 校验错误\"\n// @Failure 401 {string} string \"err_code:10001 登录失败\"\n// @Failure 500 {string} string \"err_code:20001 服务错误;err_code:20002 接口错误;err_code:20003 无数据错误;err_code:20004 数据库异常;err_code:20005 缓存异常\"\n// @Router /user/person/login [post]\n"
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft