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

Fatal error during converting from RAML #124

Open
serezha93 opened this issue May 23, 2017 · 5 comments
Open

Fatal error during converting from RAML #124

serezha93 opened this issue May 23, 2017 · 5 comments

Comments

@serezha93
Copy link

Hello,

I have tried converting RAML file and have got this problem.

api-spec-converter /home/user/api.raml --from=raml --to=swagger_2 > result.json
Fatal AssertionError: undefined == true
at /usr/local/lib/node_modules/api-spec-converter/node_modules/raml-to-swagger/src/index.js:113:7
at /usr/local/lib/node_modules/api-spec-converter/node_modules/lodash/lodash.js:4944:15
at baseForOwn (/usr/local/lib/node_modules/api-spec-converter/node_modules/lodash/lodash.js:3001:24)
at /usr/local/lib/node_modules/api-spec-converter/node_modules/lodash/lodash.js:4913:18
at Function.forEach (/usr/local/lib/node_modules/api-spec-converter/node_modules/lodash/lodash.js:9359:14)
at /usr/local/lib/node_modules/api-spec-converter/node_modules/raml-to-swagger/src/index.js:101:7
at arrayEach (/usr/local/lib/node_modules/api-spec-converter/node_modules/lodash/lodash.js:537:11)
at Function.forEach (/usr/local/lib/node_modules/api-spec-converter/node_modules/lodash/lodash.js:9359:14)
at parseSecuritySchemes (/usr/local/lib/node_modules/api-spec-converter/node_modules/raml-to-swagger/src/index.js:100:5)
at Object.exports.convert (/usr/local/lib/node_modules/api-spec-converter/node_modules/raml-to-swagger/src/index.js:20:26)
at converters.swagger_2.Promise.method.raml (/usr/local/lib/node_modules/api-spec-converter/lib/formats/raml.js:17:41)
at tryCatcher (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/util.js:16:23)
at /usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/method.js:15:34
at Promise.try (/usr/local/lib/node_modules/api-spec-converter/lib/base_format.js:105:12)
at tryCatcher (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/util.js:16:23)
at Function.Promise.attempt.Promise.try (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/method.js:39:29)

@MikeRalphson
Copy link
Contributor

MikeRalphson commented May 23, 2017

Could you upload the RAML definition to a gist? If not the whole file, then the securitySchemes section?

Possibly related to APIs-guru/raml-to-swagger#1

@serezha93
Copy link
Author

@MikeRalphson
Copy link
Contributor

Thanks @serezha93 - does security/session.yml include a type: beginning x- ?

@serezha93
Copy link
Author

serezha93 commented May 23, 2017

@MikeRalphson , yep. You'are right about this. And I have read request for PR you give here. It's my case.

It will be great if you complete this PR if not I can finish it for you this week.

As I understood it wasn't realized : (

@MikeRalphson
Copy link
Contributor

@serezha93 I have asked the author of the PR whether he is still interested in progressing it. If not I will attempt to finish it, but it wouldn't be before next week.

One thing you could try is commenting out lines 24 and 28 from your RAML definition and see if there are other problems. You would need to rebuild the missing session securityDefinition in the swagger output file by hand.

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

2 participants