Open
Description
Describe the bug
ℹ try to get swagger by URL "https://fakerestapi.azurewebsites.net/swagger/v1/swagger.yaml" 8:23:21 PM
ERROR error while fetching data from URL "https://fakerestapi.azurewebsites.net/swagger/v1/swagger.yaml" fetch failed 8:23:21 PM
at <anonymous> (node:internal/deps/undici/undici:97:352419)
at <anonymous> (https://vitejsvitebzr4utiz-2ovd.w-credentialless-staticblitz.com/blitz.4d9fd228.js:31:28909)
[cause]: other side closed
at new UndiciError (node:internal/deps/undici/undici:97:402)
at new SocketError (node:internal/deps/undici/undici:97:3383)
at TLSSocket.<anonymous> (node:internal/deps/undici/undici:97:236673)
at TLSSocket.emit (node:events:30:11150)
at endReadableNT (node:internal/streams/readable:230:10631)
at processTicksAndRejections (node:internal/process/task_queues:196:1067)
at <anonymous> (https://vitejsvitebzr4utiz-2ovd.w-credentialless-staticblitz.com/blitz.4d9fd228.js:31:295436)
at _0x379a45 (https://vitejsvitebzr4utiz-2ovd.w-credentialless-staticblitz.com/blitz.4d9fd228.js:31:295517)
at _0x5a6932 (https://vitejsvitebzr4utiz-2ovd.w-credentialless-staticblitz.com/blitz.4d9fd228.js:31:544416)
at <anonymous> (https://vitejsvitebzr4utiz-2ovd.w-credentialless-staticblitz.com/blitz.4d9fd228.js:31:544200)
ERROR Cannot create property 'info' on string 'error while fetching data from URL "https://fakerestapi.azurewebsites.net/swagger/v1/swagger.yaml"' 8:23:21 PM
at eval (node_modules/swagger-typescript-api/dist/src-BzzyC03Z.js:2339:16)
at https://vitejsvitebzr4utiz-2ovd.w-credentialless-staticblitz.com/blitz.4d9fd228.js:31:27327
at new Promise (<anonymous>)
at new Promise (https://vitejsvitebzr4utiz-2ovd.w-credentialless-staticblitz.com/blitz.4d9fd228.js:31:27262)
at SwaggerSchemaResolver.convertSwaggerObject (node_modules/swagger-typescript-api/dist/src-BzzyC03Z.js:2337:10)
at SwaggerSchemaResolver.create (node_modules/swagger-typescript-api/dist/src-BzzyC03Z.js:2334:21)
at async CodeGenProcess.start (node_modules/swagger-typescript-api/dist/src-BzzyC03Z.js:2873:19)
at async Module.generateApi (node_modules/swagger-typescript-api/dist/src-BzzyC03Z.js:3084:9)
at async Object.run (node_modules/swagger-typescript-api/dist/cli.js:284:3)
at async runCommand (node_modules/citty/dist/index.mjs:337:16)
Link to the blitz that caused the error
Steps to reproduce
npm i swagger-typescript-api
npm pkg set scripts.foo="swagger-typescript-api generate -p https://fakerestapi.azurewebsites.net/swagger/v1/swagger.json -o ./src/gen/fake --clean-output --modular --extract-enums"
npm run foo
Expected behavior
the tool should be able to download remote file and parse it.
This tools also supports local files - same error
Parity with Local
- I have run the project in my local machine and I could not reproduce the issue.
Screenshots
Platform
Browser name = Chrome
Full version = 136.0.0.0
Major version = 136
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
performance.memory = {
"totalJSHeapSize": 148061101,
"usedJSHeapSize": 144672477,
"jsHeapSizeLimit": 4294705152
}
Hash = 4d9fd228
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels