1 | {
|
2 | "title": "ArrayValidator",
|
3 | "@id": "stencila:ArrayValidator",
|
4 | "extends": "Validator",
|
5 | "role": "validation",
|
6 | "status": "unstable",
|
7 | "category": "data",
|
8 | "description": "A validator specifying constraints on an array node.",
|
9 | "properties": {
|
10 | "type": {
|
11 | "@id": "schema:type",
|
12 | "description": "The name of the type.",
|
13 | "type": "string",
|
14 | "enum": [
|
15 | "ArrayValidator"
|
16 | ],
|
17 | "default": "ArrayValidator",
|
18 | "from": "Entity"
|
19 | },
|
20 | "id": {
|
21 | "@id": "schema:id",
|
22 | "description": "The identifier for this item.",
|
23 | "type": "string",
|
24 | "from": "Entity"
|
25 | },
|
26 | "meta": {
|
27 | "@id": "stencila:meta",
|
28 | "description": "Metadata associated with this item.",
|
29 | "type": "object",
|
30 | "from": "Entity"
|
31 | },
|
32 | "itemsValidator": {
|
33 | "@id": "stencila:itemsValidator",
|
34 | "description": "Another validator node specifying the constraints on all items in the array.",
|
35 | "allOf": [
|
36 | {
|
37 | "$ref": "ValidatorTypes.schema.json"
|
38 | }
|
39 | ],
|
40 | "from": "ArrayValidator"
|
41 | },
|
42 | "contains": {
|
43 | "@id": "stencila:contains",
|
44 | "description": "An array node is valid if at least one of its items is valid against the `contains` schema.",
|
45 | "allOf": [
|
46 | {
|
47 | "$ref": "ValidatorTypes.schema.json"
|
48 | }
|
49 | ],
|
50 | "from": "ArrayValidator"
|
51 | },
|
52 | "minItems": {
|
53 | "@id": "stencila:minItems",
|
54 | "description": "An array node is valid if its size is greater than, or equal to, this value.",
|
55 | "type": "integer",
|
56 | "minimum": 0,
|
57 | "from": "ArrayValidator"
|
58 | },
|
59 | "maxItems": {
|
60 | "@id": "stencila:maxItems",
|
61 | "description": "An array node is valid if its size is less than, or equal to, this value.",
|
62 | "type": "integer",
|
63 | "minimum": 0,
|
64 | "from": "ArrayValidator"
|
65 | },
|
66 | "uniqueItems": {
|
67 | "@id": "stencila:uniqueItems",
|
68 | "description": "A flag to indicate that each value in the array should be unique.",
|
69 | "type": "boolean",
|
70 | "from": "ArrayValidator"
|
71 | }
|
72 | },
|
73 | "file": "ArrayValidator.schema.yaml",
|
74 | "children": [],
|
75 | "descendants": [],
|
76 | "$schema": "http://json-schema.org/draft-07/schema#",
|
77 | "$id": "https://schema.stenci.la/v1/ArrayValidator.schema.json",
|
78 | "source": "https://github.com/stencila/schema/blob/master/schema/ArrayValidator.schema.yaml",
|
79 | "type": "object",
|
80 | "additionalProperties": false,
|
81 | "required": [
|
82 | "type"
|
83 | ],
|
84 | "propertyAliases": {}
|
85 | }
|