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

Library is broken. #2

Open
sulaiman1073 opened this issue Mar 23, 2020 · 1 comment
Open

Library is broken. #2

sulaiman1073 opened this issue Mar 23, 2020 · 1 comment

Comments

@sulaiman1073
Copy link

I've ran the example in the readme, and got this:

assert.js:374
    throw err;
    ^

AssertionError [ERR_ASSERTION]: requires a joi schema object
    at convert (/home/***/test/node_modules/joi-to-json-schema/build/index.js:235:24)
    at Object.add_joi_model (/home/***/test/node_modules/joi-to-openapi-definition/index.js:11:19)
    at Object.<anonymous> (/home/***/test/index.js:33:6)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
    at internal/main/run_main_module.js:17:11 {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,

Using these versions

  "dependencies": {
    "@hapi/joi": "^17.1.1",
    "joi-to-openapi-definition": "^0.1.1"
  }
@benrei
Copy link
Owner

benrei commented Mar 24, 2020

Hi,
I'm waiting on a update from the 'joi-to-json-schema' package to support '@hapi/joi": "^17.1.1'.
Currently only @hapi/joi up to 15.x is supported.
This issue is related as well

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