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