Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI 3.0 Import by Postman 7.0.7 fails #44

Closed
mrehder opened this issue Apr 2, 2019 · 8 comments
Closed

OpenAPI 3.0 Import by Postman 7.0.7 fails #44

mrehder opened this issue Apr 2, 2019 · 8 comments

Comments

@mrehder
Copy link

mrehder commented Apr 2, 2019

Import fails.
Log message:
[2648][1554214948381][requester][error]["Open API 3~Failed to import Open API 3.0",{"name":"TypeError","message":"Cannot read property 'push' of undefined","stack":"TypeError: Cannot read property 'push' of undefined\n at _.forEach (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:42773:18)\n at arrayEach (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:6875:11)\n at Function.forEach (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:15701:14)\n at Object.convertPathVariables (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:42772:9)\n at Object.convertRequestToItem (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:43655:48)\n at Object.convertChildToItemGroup (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:42887:17)\n at Object.convertChildToItemGroup (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:42874:21)\n at Object.convertChildToItemGroup (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:42864:20)\n at Object.generateCollection (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:66254:18)\n at Object.convert (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:66367:12)\n at webpackJsonp.3345.module.exports (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:66382:15)\n at Object.convert (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:66170:14)\n at Promise (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:66118:16)\n at Promise ()\n at Object.convert (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:66115:12)\n at importDataAs (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:118887:38)\n at Object.convertRawData (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/postman-converters.js:118857:26)\n at Object.then.converter (file:///C:/Users/mrehder/AppData/Local/Postman/app-7.0.7/resources/app.asar/js/vendor-shared.js:156519:134)\n at "}]

@abhijitkane
Copy link
Member

@mrehder Can you attach a sample OpenAPI spec that throws this error while importing?

@mrehder
Copy link
Author

mrehder commented Apr 17, 2019 via email

@abhijitkane
Copy link
Member

@mrehder Can you upgrade to Postman 7.1.0 and check if you're still seeing the issue? If yes, we'll need a sample spec (with sensitive data removed) that you're unable to import to debug the issue further.

@mrehder
Copy link
Author

mrehder commented May 29, 2019 via email

@ryparker
Copy link

ryparker commented Jun 18, 2019

Same issue here, also the --test does not work.

$ openapi2postmanv2 --test                                           
fs.js:115
    throw err;
    ^

Error: ENOENT: no such file or directory, open '../examples/sample-swagger.yaml'
    at Object.openSync (fs.js:439:3)
    at Object.readFileSync (fs.js:344:35)
    at Object.<anonymous> (/usr/local/lib/node_modules/openapi-to-postmanv2/bin/openapi2postmanv2.js:100:20)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)

@ryparker
Copy link

openapi2postmanv2 -V returns 0.0.1

@ryparker
Copy link

Looks related to issue: #80 Fix is here: #81

@abhijitkane
Copy link
Member

This is fixed in v0.0.16, and this is included in Postman v7.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants