@hestia-earth/schema-validation 30.6.0 → 30.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/validate.js +2 -1
package/package.json
CHANGED
package/validate.js
CHANGED
|
@@ -63,6 +63,7 @@ var Ajv = require("ajv");
|
|
|
63
63
|
var schema_1 = require("@hestia-earth/schema");
|
|
64
64
|
var json_schema_1 = require("@hestia-earth/json-schema");
|
|
65
65
|
var validators_1 = require("./validators");
|
|
66
|
+
var draft4 = require('ajv/lib/refs/json-schema-draft-04.json');
|
|
66
67
|
var existingNodeRequired = Object.freeze({ required: ['@id', '@type'] });
|
|
67
68
|
var validateSchemaType = function (schemas, content) {
|
|
68
69
|
var type = content['@type'] || content.type;
|
|
@@ -115,7 +116,7 @@ var initAjv = function () {
|
|
|
115
116
|
allErrors: true,
|
|
116
117
|
verbose: true
|
|
117
118
|
});
|
|
118
|
-
ajv.addMetaSchema(
|
|
119
|
+
ajv.addMetaSchema(draft4);
|
|
119
120
|
(0, validators_1.init)(ajv);
|
|
120
121
|
return ajv;
|
|
121
122
|
};
|