mirror of
https://github.com/beego/bee.git
synced 2024-11-22 05:00:54 +00:00
Fix required struct tag
This commit is contained in:
parent
6a86284cec
commit
f694778078
@ -1168,7 +1168,7 @@ func parseStruct(st *ast.StructType, k string, m *swagger.Schema, realTypes *[]s
|
|||||||
name = ts[0]
|
name = ts[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if required := stag.Get("required"); required != "" {
|
if required := stag.Get("required"); strings.EqualFold(required, "true") {
|
||||||
m.Required = append(m.Required, name)
|
m.Required = append(m.Required, name)
|
||||||
}
|
}
|
||||||
if desc := stag.Get("description"); desc != "" {
|
if desc := stag.Get("description"); desc != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user