ajv-keywords
Advanced tools
Comparing version 2.0.0-beta.0 to 2.0.0-beta.1
'use strict'; | ||
var util = require('./_util'); | ||
module.exports = function defFunc(ajv) { | ||
@@ -15,5 +17,3 @@ defFunc.definition = { | ||
patternProperties: { | ||
'^(\\/([^~\\/]|~0|~1)*)*(\\/)?$': { | ||
$ref: 'http://json-schema.org/draft-06/schema#' | ||
} | ||
'^(\\/([^~\\/]|~0|~1)*)*(\\/)?$': util.metaSchemaRef(ajv) | ||
}, | ||
@@ -20,0 +20,0 @@ additionalProperties: false |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var $schema = it.schema[$keyword]; | ||
var $schemaPath = it.schemaPath + '.' + $keyword; | ||
var $schemaPath = it.schemaPath + it.util.getProperty($keyword); | ||
var $errSchemaPath = it.errSchemaPath + '/' + $keyword; | ||
@@ -10,0 +10,0 @@ var $breakOnError = !it.opts.allErrors; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var $schema = it.schema[$keyword]; | ||
var $schemaPath = it.schemaPath + '.' + $keyword; | ||
var $schemaPath = it.schemaPath + it.util.getProperty($keyword); | ||
var $errSchemaPath = it.errSchemaPath + '/' + $keyword; | ||
@@ -10,0 +10,0 @@ var $breakOnError = !it.opts.allErrors; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var $schema = it.schema[$keyword]; | ||
var $schemaPath = it.schemaPath + '.' + $keyword; | ||
var $schemaPath = it.schemaPath + it.util.getProperty($keyword); | ||
var $errSchemaPath = it.errSchemaPath + '/' + $keyword; | ||
@@ -10,0 +10,0 @@ var $breakOnError = !it.opts.allErrors; |
'use strict'; | ||
var util = require('./_util'); | ||
module.exports = function defFunc(ajv) { | ||
if (ajv.RULES.keywords.switch && ajv.RULES.keywords.if) return; | ||
var metaSchemaUri = 'http://json-schema.org/draft-06/schema#'; | ||
var metaSchemaRef = util.metaSchemaRef(ajv); | ||
@@ -17,7 +19,7 @@ defFunc.definition = { | ||
properties: { | ||
'if': { $ref: metaSchemaUri }, | ||
'if': metaSchemaRef, | ||
'then': { | ||
anyOf: [ | ||
{ type: 'boolean' }, | ||
{ $ref: metaSchemaUri } | ||
metaSchemaRef | ||
] | ||
@@ -24,0 +26,0 @@ }, |
{ | ||
"name": "ajv-keywords", | ||
"version": "2.0.0-beta.0", | ||
"version": "2.0.0-beta.1", | ||
"description": "Custom JSON-Schema keywords for Ajv validator", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54874
27
882