chenshuai2144 / openapi2typescript

一个被大范围使用的小工具
312 stars 136 forks source link

新版本v1.4.1无法正常生成接口文件 #45

Closed NeverStop1024 closed 2 years ago

NeverStop1024 commented 2 years ago

报错信息:

image

openapi.json { "openapi": "3.0.1", "info": { "title": "酒店", "description": "", "version": "1.0.0" }, "tags": [ { "name": "用户" }, { "name": "系统" } ], "paths": { "/api/login": { "get": { "summary": "登录", "x-apifox-folder": "用户", "x-apifox-status": "developing", "deprecated": false, "description": "", "tags": [ "用户" ], "parameters": [], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "status": { "type": "string", "description": "ok为成功" }, "token": { "type": "string" }, "config": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" } }, "required": [ "name" ] } }, "currentUser": { "type": "object", "properties": { "user_type": { "type": "string", "description": "0为管理员" }, "shift": { "type": "string" }, "shiftName": { "type": "string" }, "hotelCode": { "type": "string" } }, "required": [ "user_type", "shift", "shiftName", "hotelCode" ] } }, "required": [ "status", "currentUser", "token", "config" ] } }, "required": [ "code", "data", "message" ] }, "examples": {} } } } } } }, "/api/sys/shift": { "get": { "summary": "班次", "x-apifox-folder": "系统", "x-apifox-status": "developing", "deprecated": false, "description": "", "tags": [ "系统" ], "parameters": [], "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" } }, "required": [ "id", "description" ] } } }, "required": [ "code", "data" ] }, "examples": {} } } } } } } }, "components": { "schemas": {} } }

chen-kay commented 2 years ago

fixed in https://github.com/chenshuai2144/openapi2typescript/issues/46