1
0
mirror of https://github.com/beego/bee.git synced 2024-11-24 13:30:53 +00:00

update tag

This commit is contained in:
astaxie 2014-06-20 12:03:42 +08:00
parent d30c68e72f
commit 89ae690fdd

View File

@ -463,7 +463,9 @@ func getModel(str string) (objectname string, m swagger.Model) {
for _, field := range st.Fields.List {
mp := swagger.ModelProperty{}
mp.Type = fmt.Sprint(field.Type)
mp.Description = strings.Trim(field.Tag.Value, "`")
if field.Tag != nil {
mp.Description = strings.Trim(field.Tag.Value, "`")
}
m.Properties[field.Names[0].Name] = mp
}
}