upgrade api generator to optimized build