diff --git a/generate/swaggergen/g_docs.go b/generate/swaggergen/g_docs.go index 73ba71b8b..ea206038c 100644 --- a/generate/swaggergen/g_docs.go +++ b/generate/swaggergen/g_docs.go @@ -1185,6 +1185,10 @@ func parseStruct(st *ast.StructType, k string, m *swagger.Schema, realTypes *[]s mp.Example = str2RealType(example, realType) } + if len(tagValues) == 2 && tagValues[1] == "string" { + mp.Type = "string" + } + m.Properties[name] = mp } if ignore := stag.Get("ignore"); ignore != "" {