Changed JSON schema validator's options to remove warning: "$ref: keywords ignored in schema at path "#" "

Signed-off-by: Kirusi Msafiri<kirusi.msafiri@gmail.com>
This commit is contained in:
Kirusi 2019-04-17 10:31:17 -04:00
parent 8dae385eaa
commit 4cde6753ac
1 changed files with 3 additions and 2 deletions

View File

@ -16,8 +16,9 @@ const reserved = {
const schema = require("../../ext/spec_0_2.json");
// Default options
const ajv = new Ajv();
const ajv = new Ajv({
extendRefs: true // validate all keywords in the schemas with $ref (the default behaviour in versions before 5.0.0)
});
const validate = ajv.compile(schema);