const Ajv = require("ajv")
ajv = new Ajv({
// options here
});
const schema = {
// suppose a generic schema with a custom keyword
"test": 42
};
// This evaluates true
const isSchemaValid = ajv.validateSchema(schema);
console.log("Is schema valid?", isSchemaValid);
const data = {
};
// however if I use what I thought to be a valid schema
// I get an exception at "compile time"
const validate = ajv.compile(schema); // <-- throws because in strict mode unkwnown keywords are not allowed