# api_convert_py **Repository Path**: iamsuperflying/api_convert_py ## Basic Information - **Project Name**: api_convert_py - **Description**: swagger3.0 文档转换成 OC 文件的简版工具. - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-12 - **Last Updated**: 2021-11-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # api_convert_py swagger3.0 文档转换成 OC 文件. ## 环境 **macOS** **Python3** ```shell pip3 install requests ``` ```shell pip3 install chevron ``` ## 使用 cd 到项目文件夹运行 ```shell python3 ./api.py ``` ### config.plist 文件 | Key | 含义 | | --------------------- | ------------------------------- | | AutoImportMJExtension | 是否自动导入 MJExtension 头文件 | | OutDir | 生成的 OC 文件输出路径 | | URL | 接口地址 | | DataTypes | 文件类型转换规则 | | UseBaseType | 是否使用基本数据类型 | | ClassPrefix | 类前缀 | | KeyWords | OC 不能使用的关键字替换规则 | ### const.py ##### specs > 包含注释生成规则, 如果 swagger 存在这些字段, 会被解析到注释. 可以选择保留解析的几种情况.