diff --git a/generate/swaggergen/g_docs.go b/generate/swaggergen/g_docs.go index 25a0672..7b77c15 100644 --- a/generate/swaggergen/g_docs.go +++ b/generate/swaggergen/g_docs.go @@ -1193,6 +1193,10 @@ func parseStruct(imports []*ast.ImportSpec, st *ast.StructType, k string, m *swa 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 != "" {