mirror of
https://github.com/beego/bee.git
synced 2024-11-24 23:30:55 +00:00
array format
This commit is contained in:
parent
d0b3ede4ec
commit
58bfa5c1ec
@ -777,12 +777,20 @@ func setParamType(para *swagger.Parameter, typ string, pkgpath, controllerName s
|
|||||||
appendModels(pkgpath, controllerName, realTypes)
|
appendModels(pkgpath, controllerName, realTypes)
|
||||||
}
|
}
|
||||||
if isArray {
|
if isArray {
|
||||||
para.Schema = &swagger.Schema{
|
if para.In == "body" {
|
||||||
Type: "array",
|
para.Schema = &swagger.Schema{
|
||||||
Items: &swagger.Schema{
|
Type: "array",
|
||||||
|
Items: &swagger.Schema{
|
||||||
|
Type: paraType,
|
||||||
|
Format: paraFormat,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
para.Type = "array"
|
||||||
|
para.Items = &swagger.ParameterItems{
|
||||||
Type: paraType,
|
Type: paraType,
|
||||||
Format: paraFormat,
|
Format: paraFormat,
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
para.Type = paraType
|
para.Type = paraType
|
||||||
|
Loading…
Reference in New Issue
Block a user