add code generation to api.json