1
0
鏡像自 https://github.com/beego/bee.git 已同步 2025-10-26 13:43:50 +00:00

Separate and add @Description with @Summary params

@Description -> is "descriptions" in swagger
@Summary -> is "summary" in swagger

this different options.
此提交包含在:
Konstantin
2016-08-25 19:32:39 +03:00
提交者 GitHub
父節點 f813e990c0
當前提交 7e60509231

查看文件

@@ -354,7 +354,9 @@ func parserComments(comments *ast.CommentGroup, funcName, controllerName, pkgpat
} else if strings.HasPrefix(t, "@Title") {
opts.OperationID = controllerName + "." + strings.TrimSpace(t[len("@Title"):])
} else if strings.HasPrefix(t, "@Description") {
opts.Summary = strings.TrimSpace(t[len("@Description"):])
opts.Description = strings.TrimSpace(t[len("@Description"):])
} else if strings.HasPrefix(t, "@Summary") {
opts.Summary = strings.TrimSpace(t[len("@Summary"):])
} else if strings.HasPrefix(t, "@Success") {
ss := strings.TrimSpace(t[len("@Success"):])
rs := swagger.Response{}