ajv-json-logic
Version:
JSON Logic integration for Ajv validator
77 lines (73 loc) • 1.7 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var $schema = "http://json-schema.org/draft-07/schema#";
var $id = "http://jsonlogic.com/schemas/operators/accessor/missing_some.json";
var title = "missing_some";
var description = "Takes a minimum number of data keys that are required, and an array of keys to search for (same format as var or missing). Returns an empty array if the minimum is met, or an array of the missing keys otherwise.";
var type = "object";
var additionalProperties = false;
var required = [
"missing_some"
];
var properties = {
missing_some: {
type: "array",
minItems: 2,
maxItems: 2,
items: [
{
type: "integer",
title: "Need-Count",
description: "Takes a minimum number of data keys that are required"
},
{
$ref: "http://jsonlogic.com/schemas/common/var.json",
description: "An array of keys to search for (same format as var or missing)."
}
]
}
};
var examples = [
{
missing_some: [
1,
[
"a",
"b",
"c"
]
]
},
{
missing_some: [
2,
[
"a",
"b",
"c"
]
]
}
];
var accessorMissingSome = {
$schema: $schema,
$id: $id,
title: title,
description: description,
type: type,
additionalProperties: additionalProperties,
required: required,
properties: properties,
examples: examples
};
exports.$id = $id;
exports.$schema = $schema;
exports.additionalProperties = additionalProperties;
exports.default = accessorMissingSome;
exports.description = description;
exports.examples = examples;
exports.properties = properties;
exports.required = required;
exports.title = title;
exports.type = type;
//# sourceMappingURL=missing_some.json.cjs.map