From 4cde6753ace522d365cc710f7c129445f59ddbb2 Mon Sep 17 00:00:00 2001 From: Kirusi Date: Wed, 17 Apr 2019 10:31:17 -0400 Subject: [PATCH] Changed JSON schema validator's options to remove warning: "$ref: keywords ignored in schema at path "#" " Signed-off-by: Kirusi Msafiri --- lib/specs/spec_0_2.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/specs/spec_0_2.js b/lib/specs/spec_0_2.js index 958dd6f..05b893b 100644 --- a/lib/specs/spec_0_2.js +++ b/lib/specs/spec_0_2.js @@ -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);