We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
重新整理了下问题 @gogoyqj
module.exports = { "url": "./swagger.json", "swaggerParser": { "-o": "src/test", "-t": "v3/plugins/types-only", // "-DmodelPropertyNaming=snake_case": "", "-DmodelPropertyNaming=original": "", // 命名与yapi中的保持一致 }, "guardConfig": { "mode": "strict", "validUrlReg": /cungong/g } }
在 V2/V3中都存在,必现,特别边缘的场景,暂时通过手工修正
生成的ts中,require 为 false 的params,也变成了必填项
module.exports = { "url": "./swagger.json", "swaggerParser": { "-DmodelPropertyNaming=original": "", "-o": "src/test", // "-t": "plugins/types-only" // 存在大小写异常、model未生成的case "-t": "v3/plugins/types-only" // 存在大小写异常 required 生成异常 // "-t": "v3/plugins/typescript-tkit-autos" // 只存在大小写异常 // "-t": "v3/plugins/types-tkit" // 错误信息:Error: ENOENT: no such file or directory json 找不到 }, "guardConfig": { "mode": "strict", "validUrlReg": /cungong|spamftp/g } }
{ "swagger": "2.0", "info": { "title": "unknown", "version": "last", "description": "unknown" }, "tags": [ { "name": "cungong", "description": "cungongDesc" } ], "basePath": "", "schemes": [ "http" ], "paths": { "/cungong/confiltermis/excavateadd": { "post": { "tags": [ "cungong" ], "summary": "任务", "description": "", "consumes": [ "multipart/form-data" ], "parameters": [ { "name": "name", "in": "formData", "required": true, "description": "description", "type": "string" }, { "name": "command_nos", "in": "formData", "required": false, "description": "description", "type": "string" }, { "name": "add_type", "in": "formData", "required": true, "description": "description", "type": "string" }, { "name": "file_url", "in": "formData", "required": false, "description": "description", "type": "string" }, { "name": "data_status", "in": "formData", "required": false, "description": "description", "type": "string" }, { "name": "data_rule", "in": "formData", "required": false, "description": "description", "type": "string" }, { "name": "is_ai", "in": "formData", "required": false, "description": "description", "type": "string" }, { "name": "start_time", "in": "formData", "required": false, "description": "description", "type": "string" }, { "name": "end_time", "in": "formData", "required": false, "description": "description", "type": "string" } ], "responses": { "200": { "description": "successful operation", "schema": { "type": "object", "title": "CungongConfiltermisExcavateadd", "properties": { "errNo": { "type": "number" }, "errstr": { "type": "string" } }, "required": [ "errNo", "errstr" ] } } }, "operationId": "cungongConfiltermisExcavateaddPost" } } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
重新整理了下问题 @gogoyqj
V3中camel命名异常,可通过配置 swaggerParse 解决【已解决】
1. 大小写异常 case 【影响小,可忽略】
在 V2/V3中都存在,必现,特别边缘的场景,暂时通过手工修正
2. V3模板 types-only 与 V2 对比,多余文件和 model 比较多,可优化冗余【待解决的小问题】
3. V3模板 types-tkit,存在 _json 目录未生成,造成报错异常 【待解决,必现】
4. V3模板下,存在 form-data require异常的问题 【应该v3模板的bug】
生成的ts中,require 为 false 的params,也变成了必填项
The text was updated successfully, but these errors were encountered: