1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 15:10:54 +00:00

Update g_docs.go

Only you pass the model name, but do not pass the location.
Although getModel() function again trying to split ( strs := strings.Split(str, ".") ) the parameter to the location and name.
This commit is contained in:
Konstantin 2016-08-18 12:58:36 +03:00 committed by GitHub
parent 11571b4af2
commit c08afc129e

View File

@ -413,7 +413,7 @@ func parserComments(comments *ast.CommentGroup, funcName, controllerName, pkgpat
pp := strings.Split(p[2], ".")
typ := pp[len(pp)-1]
if len(pp) >= 2 {
cmpath, m, mod, realTypes := getModel(typ)
cmpath, m, mod, realTypes := getModel(p[2])
para.Schema = &swagger.Schema{
Ref: "#/definitions/" + m,
}