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

hotfix: schema init

This commit is contained in:
astaxie 2016-08-24 10:54:54 +08:00
parent 5309c72ef7
commit f813e990c0

View File

@ -406,6 +406,7 @@ func parserComments(comments *ast.CommentGroup, funcName, controllerName, pkgpat
modelsList[pkgpath+controllerName][st[2]] = mod modelsList[pkgpath+controllerName][st[2]] = mod
appendModels(cmpath, pkgpath, controllerName, realTypes) appendModels(cmpath, pkgpath, controllerName, realTypes)
} else if st[1] == "{array}" { } else if st[1] == "{array}" {
rs.Schema = &swagger.Schema{}
rs.Schema.Type = "array" rs.Schema.Type = "array"
if sType, ok := basicTypes[st[2]]; ok { if sType, ok := basicTypes[st[2]]; ok {
typeFormat := strings.Split(sType, ":") typeFormat := strings.Split(sType, ":")