Skip to content

Commit 4cde675

Browse files
committed
Changed JSON schema validator's options to remove warning: "$ref: keywords ignored in schema at path "#" "
Signed-off-by: Kirusi Msafiri<[email protected]>
1 parent 8dae385 commit 4cde675

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/specs/spec_0_2.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ const reserved = {
1616

1717
const schema = require("../../ext/spec_0_2.json");
1818

19-
// Default options
20-
const ajv = new Ajv();
19+
const ajv = new Ajv({
20+
extendRefs: true // validate all keywords in the schemas with $ref (the default behaviour in versions before 5.0.0)
21+
});
2122

2223
const validate = ajv.compile(schema);
2324

0 commit comments

Comments
 (0)