fix the struct type for []Type

pull/68/head
astaxie 8 years ago
parent 61e13f70be
commit e667c0fdaa
  1. 8
      g_docs.go

@ -551,7 +551,13 @@ func getModel(str string) (pkgpath, objectname string, m swagger.Model, realType
mp := swagger.ModelProperty{}
// add type slice
if isSlice {
mp.Type = "[]" + realType
if isBasicType(realType) {
mp.Type = "[]" + realType
} else {
mp.Type = "array"
mp.Items = make(map[string]string)
mp.Items["$ref"] = realType
}
} else {
mp.Type = realType
}

Loading…
Cancel
Save