mirror of
https://github.com/beego/bee.git
synced 2024-11-22 10:10:53 +00:00
fix the struct type for []Type
This commit is contained in:
parent
61e13f70be
commit
e667c0fdaa
@ -551,7 +551,13 @@ func getModel(str string) (pkgpath, objectname string, m swagger.Model, realType
|
||||
mp := swagger.ModelProperty{}
|
||||
// add type slice
|
||||
if isSlice {
|
||||
mp.Type = "[]" + realType
|
||||
if isBasicType(realType) {
|
||||
mp.Type = "[]" + realType
|
||||
} else {
|
||||
mp.Type = "array"
|
||||
mp.Items = make(map[string]string)
|
||||
mp.Items["$ref"] = realType
|
||||
}
|
||||
} else {
|
||||
mp.Type = realType
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user