From 1e247452fff6c25948882e4f4ce9c62c4460b62c Mon Sep 17 00:00:00 2001 From: tnextday Date: Thu, 18 Aug 2016 22:29:38 +0800 Subject: [PATCH] update swagger --- g_docs.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/g_docs.go b/g_docs.go index 3199e13..5a0a047 100644 --- a/g_docs.go +++ b/g_docs.go @@ -605,15 +605,15 @@ func getModel(str string) (pkgpath, objectname string, m swagger.Schema, realTyp mp.Type = "array" if isBasicType(realType) { typeFormat := strings.Split(sType, ":") - mp.Items = []swagger.Propertie{{ + mp.Items = &swagger.Propertie{ Type: typeFormat[0], Format: typeFormat[1], - }} + } } else { - mp.Items = []swagger.Propertie{{ + mp.Items = &swagger.Propertie{ Ref: "#/definitions/" + realType, - }} + } } } else { if isBasicType(realType) {