api generate with class annotations