From f813e990c0e5daa82c646c0a74e0a679928963a7 Mon Sep 17 00:00:00 2001 From: astaxie Date: Wed, 24 Aug 2016 10:54:54 +0800 Subject: [PATCH] hotfix: schema init --- g_docs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/g_docs.go b/g_docs.go index 76d11f7..6c1e870 100644 --- a/g_docs.go +++ b/g_docs.go @@ -406,6 +406,7 @@ func parserComments(comments *ast.CommentGroup, funcName, controllerName, pkgpat modelsList[pkgpath+controllerName][st[2]] = mod appendModels(cmpath, pkgpath, controllerName, realTypes) } else if st[1] == "{array}" { + rs.Schema = &swagger.Schema{} rs.Schema.Type = "array" if sType, ok := basicTypes[st[2]]; ok { typeFormat := strings.Split(sType, ":")