# api-generator **Repository Path**: nailfar/api-generator ## Basic Information - **Project Name**: api-generator - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-02-14 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 用法 ``` git clone git@git.oschina.net:nevernet/api-generator.git cd api-generator/bin pwd # 获取到当前路径,假定是/root/xxx/api-generator/bin ``` # 创建链接 `ln -sf /root/xxx/api-generator/bin/xapi-linux-1.0.3 /usr/local/bin/xapi` # 返回到~ ``` cd ~ xapi -version # 看看是否正常输出版本 // 输出 API Generator v1.0.3 beta ``` # 该工具参数解释: 请 `xapi -help` 查看 ## 生成doc文档 #### API 自动化生成工具 > 该工具需要配合slate使用 https://github.com/nevernet/slate ``` xapi -lang doc ``` ## 生成typescript代码 ``` xapi -lang ts ``` 代码生成地方在当前目录下的generated/typescript里面。 ## 生成php代码(PHP Struct and Controllers for PhalconPHP framework) ``` xapi -lang php -debug ``` 代码生成地方在当前目录下的generated/php里面。