summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/keyword.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/keyword.js')
-rw-r--r--deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/keyword.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/keyword.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/keyword.js
index 1c9cccfe63..85e64c6004 100644
--- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/keyword.js
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/keyword.js
@@ -1,6 +1,6 @@
'use strict';
-var IDENTIFIER = /^[a-z_$][a-z0-9_$\-]*$/i;
+var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
var customRuleCode = require('./dotjs/custom');
module.exports = {
@@ -40,7 +40,7 @@ function addKeyword(keyword, definition) {
_addRule(keyword, dataType, definition);
}
- var $data = definition.$data === true && this._opts.v5;
+ var $data = definition.$data === true && this._opts.$data;
if ($data && !definition.validate)
throw new Error('$data support: "validate" function is not defined');
@@ -50,7 +50,7 @@ function addKeyword(keyword, definition) {
metaSchema = {
anyOf: [
metaSchema,
- { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data' }
+ { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
]
};
}
@@ -80,7 +80,8 @@ function addKeyword(keyword, definition) {
keyword: keyword,
definition: definition,
custom: true,
- code: customRuleCode
+ code: customRuleCode,
+ implements: definition.implements
};
ruleGroup.rules.push(rule);
RULES.custom[keyword] = rule;