support return object type in API generator