diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/ajv/lib/compile/rules.js | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) | |
download | wallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz |
update packages
Diffstat (limited to 'node_modules/ajv/lib/compile/rules.js')
-rw-r--r-- | node_modules/ajv/lib/compile/rules.js | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/node_modules/ajv/lib/compile/rules.js b/node_modules/ajv/lib/compile/rules.js index 44830ad72..66f196a93 100644 --- a/node_modules/ajv/lib/compile/rules.js +++ b/node_modules/ajv/lib/compile/rules.js @@ -1,6 +1,6 @@ 'use strict'; -var ruleModules = require('./_rules') +var ruleModules = require('../dotjs') , toHash = require('./util').toHash; module.exports = function rules() { @@ -11,17 +11,20 @@ module.exports = function rules() { { type: 'string', rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] }, { type: 'array', - rules: [ 'maxItems', 'minItems', 'uniqueItems', 'contains', 'items' ] }, + rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] }, { type: 'object', rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames', { 'properties': ['additionalProperties', 'patternProperties'] } ] }, - { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] } + { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] } ]; - var ALL = [ 'type' ]; + var ALL = [ 'type', '$comment' ]; var KEYWORDS = [ - 'additionalItems', '$schema', '$id', 'id', 'title', - 'description', 'default', 'definitions' + '$schema', '$id', 'id', '$data', 'title', + 'description', 'default', 'definitions', + 'examples', 'readOnly', 'writeOnly', + 'contentMediaType', 'contentEncoding', + 'additionalItems', 'then', 'else' ]; var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ]; RULES.all = toHash(ALL); @@ -48,6 +51,11 @@ module.exports = function rules() { return rule; }); + RULES.all.$comment = { + keyword: '$comment', + code: ruleModules.$comment + }; + if (group.type) RULES.types[group.type] = group; }); |