Skip to content

Instantly share code, notes, and snippets.

@alco
Created February 5, 2018 21:54
Show Gist options
  • Save alco/183714a0e37fa3041d05ef67ec7f2ca0 to your computer and use it in GitHub Desktop.
Save alco/183714a0e37fa3041d05ef67ec7f2ca0 to your computer and use it in GitHub Desktop.

Revisions

  1. alco created this gist Feb 5, 2018.
    31 changes: 31 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    $ apib2swagger -i my_api.apib --yaml -o my_api.yaml
    TypeError: Cannot read property 'length' of undefined
    at jsonSchemaFromMSON (/usr/local/lib/node_modules/apib2swagger/index.js:266:38)
    at /usr/local/lib/node_modules/apib2swagger/index.js:39:67
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/apib2swagger/index.js:32:26
    at Array.forEach (<anonymous>)
    at module.exports.convertParsed (/usr/local/lib/node_modules/apib2swagger/index.js:29:8)
    at Object.exports.convert (/usr/local/lib/node_modules/apib2swagger/index.js:402:23)
    at processBlueprint (/usr/local/lib/node_modules/apib2swagger/bin/apib2swagger.js:87:18)
    at ReadStream.__dirname.on.on (/usr/local/lib/node_modules/apib2swagger/bin/apib2swagger.js:67:5)
    at ReadStream.emit (events.js:165:20)

    $ api-spec-converter --from api_blueprint --to openapi_3 my_api.apib >my_api.yaml
    Fatal TypeError: Cannot read property 'length' of undefined
    at jsonSchemaFromMSON (/usr/local/lib/node_modules/api-spec-converter/node_modules/apib2swagger/index.js:266:38)
    at /usr/local/lib/node_modules/api-spec-converter/node_modules/apib2swagger/index.js:39:67
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/api-spec-converter/node_modules/apib2swagger/index.js:32:26
    at Array.forEach (<anonymous>)
    at Object.module.exports.convertParsed (/usr/local/lib/node_modules/api-spec-converter/node_modules/apib2swagger/index.js:29:8)
    at converters.swagger_2.Promise.method.apibp (/usr/local/lib/node_modules/api-spec-converter/lib/formats/api_blueprint.js:16:24)
    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:162: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)
    at module.exports.BaseFormat.convertTo (/usr/local/lib/node_modules/api-spec-converter/lib/base_format.js:154:21)
    at prom.then.spec (/usr/local/lib/node_modules/api-spec-converter/lib/base_format.js:178:19)
    at tryCatcher (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/api-spec-converter/node_modules/bluebird/js/release/promise.js:512:31)