update generate2/validate2 API, drop generate3/validate3 API