mirror of
https://github.com/beego/bee.git
synced 2024-11-24 13:30:53 +00:00
fix struct comment
This commit is contained in:
parent
8a299fa755
commit
50ffa7ed8c
@ -1205,6 +1205,10 @@ func parseStruct(imports []*ast.ImportSpec, st *ast.StructType, k string, m *swa
|
|||||||
mp.Description = desc
|
mp.Description = desc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if mp.Description == "" && field.Comment != nil {
|
||||||
|
mp.Description = strings.TrimSpace(field.Comment.Text())
|
||||||
|
}
|
||||||
|
|
||||||
if example := stag.Get("example"); example != "" && !isObject && !isSlice {
|
if example := stag.Get("example"); example != "" && !isObject && !isSlice {
|
||||||
mp.Example = str2RealType(example, realType)
|
mp.Example = str2RealType(example, realType)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user