UNPKG

673 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3function getDef() {
4 return {
5 keyword: "prohibited",
6 type: "object",
7 schemaType: "array",
8 macro: function (schema) {
9 if (schema.length === 0)
10 return true;
11 if (schema.length === 1)
12 return { not: { required: schema } };
13 return { not: { anyOf: schema.map((p) => ({ required: [p] })) } };
14 },
15 metaSchema: {
16 type: "array",
17 items: { type: "string" },
18 },
19 };
20}
21exports.default = getDef;
22module.exports = getDef;
23//# sourceMappingURL=prohibited.js.map
\No newline at end of file