Skip to content

Commit

Permalink
add custom keywords for Ajv validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Cap32 committed Jan 30, 2018
1 parent 9175c8d commit e9887e3
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/keywords.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default {
$schema: setter,
$id: setter,
$ref: setter,
$data: setter,
$comment: setter,

type: setter,
Expand Down Expand Up @@ -69,8 +68,30 @@ export default {
writeOnly: setter,
examples: setter,

$data: setter, // https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)
$merge: setter, // https://tools.ietf.org/html/rfc7396
$patch: setter, // https://tools.ietf.org/html/rfc6902

// Custom JSON-Schema keywords for Ajv validator https://github.com/epoberezkin/ajv-keywords
instanceof: setter,
typeof: setter,
range: setter,
exclusiveRange: setter,
switch: setter,
continue: setter,
select: setter,
selectCases: setter,
selectDefault: setter,
patternRequired: setter,
deepProperties: setter,
deepRequired: setter,
uniqueItemProperties: setter,
regexp: setter,
formatMaximum: setter,
formatMinimum: setter,
formatExclusiveMaximum: setter,
formatExclusiveMinimum: setter,
dynamicDefaults: setter,

func,
};

0 comments on commit e9887e3

Please sign in to comment.