support interface type

This commit is contained in:
wucheng 2020-08-26 11:17:09 +08:00
parent 53b0b68d00
commit 2c673b7d1e
1 changed files with 2 additions and 0 deletions

View File

@ -1260,6 +1260,8 @@ func typeAnalyser(f *ast.Field) (isSlice bool, realType, swaggerType string) {
return false, astTypeMap, basicTypes[val]
}
return false, val, astTypeObject
case *ast.InterfaceType:
return false, "interface", astTypeObject
}
basicType := fmt.Sprint(f.Type)
if object, isStdLibObject := stdlibObject[basicType]; isStdLibObject {