Hi Evgeny,
I am trying to run your library, but upon fixing basic missing errors (with let cb,pre,post;), I still get errors when I run the basic example provided under "Usage". The error I get is:
`json-schema-traverse/index.js:11
var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};
^
TypeError: Cannot read properties of undefined (reading 'pre')`
The following is the code I'm using:
const traverse = require('json-schema-traverse');
const schema = {
properties: {
foo: {type: 'string'},
bar: {type: 'integer'}
}
};
let cb:any;
let pre:any;
let post:any;
traverse(schema, {cb});
What would be a suggestion to solve this issue?
In addition, I am interested in using the library in order to traverse arbitrary json schemas? Is this library able to deal with json-schemas of arbitrary shapes?
Hi Evgeny,
I am trying to run your library, but upon fixing basic missing errors (with let cb,pre,post;), I still get errors when I run the basic example provided under "Usage". The error I get is:
The following is the code I'm using:
What would be a suggestion to solve this issue?
In addition, I am interested in using the library in order to traverse arbitrary json schemas? Is this library able to deal with json-schemas of arbitrary shapes?