yayoc / swagger-to-flowtype

Generate Flow types from swagger file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support reading from URLs

NullDivision opened this issue · comments

Using a URL doesn't work

$ swagger-to-flowtype http://localhost:8000/api/swagger
{ Error: ENOENT: no such file or directory, open 'http://localhost:8000/api/swagger'
    at Object.fs.openSync (fs.js:663:18)
    at Object.fs.readFileSync (fs.js:568:33)
    at generator (/home/nulldivision/Projects/MyProject/node_modules/swagger-to-flowtype/dist/index.js:146:35)
    at Command.<anonymous> (/home/nulldivision/Projects/MyProject/node_modules/swagger-to-flowtype/dist/index.js:170:18)
    at Command.listener (/home/nulldivision/Projects/MyProject/node_modules/commander/index.js:300:8)
    at emitOne (events.js:125:13)
    at Command.emit (events.js:221:7)
    at Command.parseArgs (/home/nulldivision/Projects/MyProject/node_modules/commander/index.js:637:12)
    at Command.parse (/home/nulldivision/Projects/MyProject/node_modules/commander/index.js:457:21)
    at Object.<anonymous> (/home/nulldivision/Projects/MyProject/node_modules/swagger-to-flowtype/dist/index.js:177:4)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'http://localhost:8000/api/swagger' }

We need this feature as well at my company. Would you like us to contribute it @yayoc?

commented

Cool, yes please @dawsbot

commented

I added this feature on v0.1.0.