1
0
mirror of https://github.com/beego/bee.git synced 2024-11-14 06:40:54 +00:00

check package on find model

This commit is contained in:
ilylia 2017-08-11 19:10:04 +08:00
parent aae0cc4587
commit c8afe5d86a

View File

@ -866,6 +866,10 @@ func getModel(str string) (objectname string, m swagger.Schema, realTypes []stri
if k != objectname { if k != objectname {
continue continue
} }
// check package
if len(strs) > 1 && pkg.Name != strs[len(strs)-2] {
continue
}
packageName = pkg.Name packageName = pkg.Name
parseObject(d, k, &m, &realTypes, astPkgs, pkg.Name) parseObject(d, k, &m, &realTypes, astPkgs, pkg.Name)
} }