chenshuai2144 / openapi2typescript

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

🐛[BUG]v1.4.1 schemaPath 无法使用http #46

Closed chen-kay closed 2 years ago

chen-kay commented 2 years ago

🐛 bug 描述

chenshuai2144/openapi2typescript/blob/700ff14119bd047e315d022a2f165e127ed9e822

v1.4.1此处更新导致以下异常

fetch openapi error: TypeError: Protocol "http:" not supported. Expected "https:"
    at new NodeError (node:internal/errors:371:5)
    at new ClientRequest (node:_http_client:158:11)
    at request (node:http:96:10)
    at C:\Users\...\node_modules\node-fetch\lib\index.js:1468:15
    at new Promise (<anonymous>)
    at Function.fetch [as default] (C:\Users\...\node_modules\node-fetch\lib\index.js:1437:9)
    at C:\Users\...\node_modules\@umijs\openapi\dist\index.js:41:52
    at Generator.next (<anonymous>)
    at C:\Users\...\node_modules\tslib\tslib.js:117:75
    at new Promise (<anonymous>) {
  code: 'ERR_INVALID_PROTOCOL'
}

@chenshuai2144

chenshuai2144 commented 2 years ago

在另外一个里面看吧。