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

Merge pull request #252 from tnextday/develop

add todo
This commit is contained in:
astaxie 2016-08-22 19:31:49 +08:00 committed by GitHub
commit a985ff0a06

View File

@ -615,6 +615,7 @@ func getModel(str string) (pkgpath, objectname string, m swagger.Schema, realTyp
ColorLog("Unknown type without TypeSec: %v\n", d) ColorLog("Unknown type without TypeSec: %v\n", d)
os.Exit(1) os.Exit(1)
} }
// TODO support other types, such as `ArrayType`, `MapType`, `InterfaceType` etc...
st, ok := ts.Type.(*ast.StructType) st, ok := ts.Type.(*ast.StructType)
if !ok { if !ok {
continue continue
@ -704,7 +705,8 @@ func getModel(str string) (pkgpath, objectname string, m swagger.Schema, realTyp
} }
} }
if m.Title == "" { if m.Title == "" {
ColorLog("[ERRO]can't find the object: %s\n", str) ColorLog("[WARN]can't find the object: %s\n", str)
// TODO remove when all type have been supported
//os.Exit(1) //os.Exit(1)
} }
if len(rootapi.Definitions) == 0 { if len(rootapi.Definitions) == 0 {