mirror of
https://github.com/beego/bee.git
synced 2024-11-22 10:10:53 +00:00
Fixed an error in the basicType of pointer when the swagger document was automatically generated
This commit is contained in:
parent
4ef471170e
commit
49d791502a
@ -881,7 +881,7 @@ func typeAnalyser(f *ast.Field) (isSlice bool, realType, swaggerType string) {
|
|||||||
if k, ok := basicTypes[basicType]; ok {
|
if k, ok := basicTypes[basicType]; ok {
|
||||||
return false, basicType, k
|
return false, basicType, k
|
||||||
}
|
}
|
||||||
return false, fmt.Sprint(t.X), "object"
|
return false, basicType, "object"
|
||||||
case *ast.MapType:
|
case *ast.MapType:
|
||||||
val := fmt.Sprintf("%v", t.Value)
|
val := fmt.Sprintf("%v", t.Value)
|
||||||
if isBasicType(val) {
|
if isBasicType(val) {
|
||||||
|
Loading…
Reference in New Issue
Block a user