From c08afc129e0cb00d7bcd04b15ec5a9ca2e3a5c39 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Thu, 18 Aug 2016 12:58:36 +0300 Subject: [PATCH] Update g_docs.go Only you pass the model name, but do not pass the location. Although getModel() function again trying to split ( strs := strings.Split(str, ".") ) the parameter to the location and name. --- g_docs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g_docs.go b/g_docs.go index 005204d..af93814 100644 --- a/g_docs.go +++ b/g_docs.go @@ -413,7 +413,7 @@ func parserComments(comments *ast.CommentGroup, funcName, controllerName, pkgpat pp := strings.Split(p[2], ".") typ := pp[len(pp)-1] if len(pp) >= 2 { - cmpath, m, mod, realTypes := getModel(typ) + cmpath, m, mod, realTypes := getModel(p[2]) para.Schema = &swagger.Schema{ Ref: "#/definitions/" + m, }