Support reading from URLs
NullDivision opened this issue · comments
Tobias Elod-Zoltan commented
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' }
Dawson Botsford commented
We need this feature as well at my company. Would you like us to contribute it @yayoc?
Dawson Botsford commented
Thanks @yayoc!