mirror of
https://github.com/beego/bee.git
synced 2024-12-21 23:40:49 +00:00
add json tag like json:"xxx,string"
support
This commit is contained in:
parent
6a2f44720e
commit
95009c02ba
@ -1185,6 +1185,10 @@ func parseStruct(st *ast.StructType, k string, m *swagger.Schema, realTypes *[]s
|
|||||||
mp.Example = str2RealType(example, realType)
|
mp.Example = str2RealType(example, realType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(tagValues) == 2 && tagValues[1] == "string" {
|
||||||
|
mp.Type = "string"
|
||||||
|
}
|
||||||
|
|
||||||
m.Properties[name] = mp
|
m.Properties[name] = mp
|
||||||
}
|
}
|
||||||
if ignore := stag.Get("ignore"); ignore != "" {
|
if ignore := stag.Get("ignore"); ignore != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user