1
0
mirror of https://github.com/beego/bee.git synced 2024-11-25 20:10:55 +00:00

Merge pull request #261 from ihippik/patch-2

Separate "Description" with "Summary" params
This commit is contained in:
astaxie 2016-08-27 13:08:31 +08:00 committed by GitHub
commit cff303a528

View File

@ -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{}