bugfix about api generate