Converting from apidoc to swagger not working

I tried to use https://github.com/amanoooo/apidoc-swagger-3 to convert from apidoc to swagger in my project but I can't, I think I can't understand how should I use it. Can someone who use it, give me an example how to use it, please?

I expect that the command npx apidoc-openapi-3 works and give me an result, but I got an error: {"Block":1,"Element":"@constructor","File":".\node_modules\kuler\index.js","Source":"@constructor","level":"error","message":"Undefined error."} undefined:1 undefined ^

SyntaxError: "undefined" is not valid JSON at JSON.parse () at main (C:\Users\username\AppData\Local\npm-cache_npx\1b6d1448cbd618b9\node_modules\apidoc-openapi-3\lib.js:33:27) at Object. (C:\Users\username\AppData\Local\npm-cache_npx\1b6d1448cbd618b9\node_modules\apidoc-openapi-3\bin.js:110:1) at Module._compile (node:internal/modules/cjs/loader:1378:14) at Module._extensions..js (node:internal/modules/cjs/loader:1437:10) at Module.load (node:internal/modules/cjs/loader:1212:32) at Module._load (node:internal/modules/cjs/loader:1028:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12) at node:internal/main/run_main_module:28:49

Node.js v21.6.1

Upvotes: 0

Views: 159

Answers (0)

Related Questions