I need to validate JSON files in following way:
const setupSchema = fs.readFileSync(schemaDir +'/setup.json');
and compiling:
const setupValidator = ajv.compile(setupSchema);
My issue is that line:
console.log( setupValidator('') );
Always returns true even as validator's parameter is empty string like above. I suppose that the way of loading is bad but... need ask smarter people than me.