update tag

This commit is contained in:
astaxie 2014-06-20 12:03:42 +08:00
parent d30c68e72f
commit 89ae690fdd
1 changed files with 3 additions and 1 deletions

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
}
}