Improved type recognition for REST API generator