diff --git a/bin/openapi2postmanv2.js b/bin/openapi2postmanv2.js index 5477e504e..d27984c5b 100755 --- a/bin/openapi2postmanv2.js +++ b/bin/openapi2postmanv2.js @@ -89,6 +89,9 @@ if (testFlag) { else if (inputFile) { inputFile = path.resolve(inputFile); console.log('Input file: ', inputFile); // eslint-disable-line no-console + // The last commit removed __dirname while reading inputFile + // this will fix https://github.com/postmanlabs/openapi-to-postman/issues/4 + // inputFile should be read from the cwd, not the path of the executable swaggerData = fs.readFileSync(inputFile, 'utf8'); Converter.convert({ type: 'string',