update swagger

This commit is contained in:
tnextday 2016-08-18 22:29:38 +08:00
parent 3ccffe087e
commit 1e247452ff
1 changed files with 4 additions and 4 deletions

View File

@ -605,15 +605,15 @@ func getModel(str string) (pkgpath, objectname string, m swagger.Schema, realTyp
mp.Type = "array" mp.Type = "array"
if isBasicType(realType) { if isBasicType(realType) {
typeFormat := strings.Split(sType, ":") typeFormat := strings.Split(sType, ":")
mp.Items = []swagger.Propertie{{ mp.Items = &swagger.Propertie{
Type: typeFormat[0], Type: typeFormat[0],
Format: typeFormat[1], Format: typeFormat[1],
}} }
} else { } else {
mp.Items = []swagger.Propertie{{ mp.Items = &swagger.Propertie{
Ref: "#/definitions/" + realType, Ref: "#/definitions/" + realType,
}} }
} }
} else { } else {
if isBasicType(realType) { if isBasicType(realType) {