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

Importing Swagger fails silently #5

Closed
DrRob opened this Issue May 8, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@DrRob

DrRob commented May 8, 2018

When I tried to import a Swagger (OpenAPI) file using the Chrome Extension version, it failed silently. In the Chrome Developer Tools console I see:

TypeError: Cannot read property '$ref' of undefined
    at services.js:1375
    at Object.p [as forEach] (angular.min.js:8)
    at services.js:1366
    at Object.p [as forEach] (angular.min.js:8)
    at services.js:1230
    at Object.p [as forEach] (angular.min.js:8)
    at Object.importOAS2 (services.js:1209)
    at importProj (designer-controller.js:260)
    at designer-controller.js:224
    at angular.min.js:136 "Possibly unhandled rejection: {}"

I believe the problem can be fixed by altering line 1375 of services.js from this:

var ref = param.$ref;

to this:

var ref = resp.$ref;

@apic-apps

This comment has been minimized.

Owner

apic-apps commented Jun 29, 2018

Fixed the issue in latest version (#2.2.2)

@apic-apps apic-apps closed this Jun 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment