UNPKG

3.03 kBJSONView Raw
1{
2 "title": "IntegerValidator",
3 "@id": "stencila:IntegerValidator",
4 "extends": "NumberValidator",
5 "role": "validation",
6 "status": "unstable",
7 "category": "data",
8 "description": "A validator specifying the constraints on an integer node.",
9 "$comment": "A node will be valid if it is a number with no\nfractional part and meets any additional constraints, such as `multipleOf`,\nspecified in the validator.\nAnalogous to the JSON Schema `integer` validation [type](https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.1.1).\n",
10 "properties": {
11 "type": {
12 "@id": "schema:type",
13 "description": "The name of the type.",
14 "type": "string",
15 "enum": [
16 "IntegerValidator"
17 ],
18 "default": "IntegerValidator",
19 "from": "Entity"
20 },
21 "id": {
22 "@id": "schema:id",
23 "description": "The identifier for this item.",
24 "type": "string",
25 "from": "Entity"
26 },
27 "meta": {
28 "@id": "stencila:meta",
29 "description": "Metadata associated with this item.",
30 "type": "object",
31 "from": "Entity"
32 },
33 "minimum": {
34 "@id": "stencila:minimum",
35 "type": "number",
36 "description": "The inclusive lower limit for a numeric node.",
37 "$comment": "A number is valid if it is greater than, or exactly equal to, `minimum`.\n",
38 "from": "NumberValidator"
39 },
40 "exclusiveMinimum": {
41 "@id": "stencila:exclusiveMinimum",
42 "type": "number",
43 "description": "The exclusive lower limit for a numeric node.",
44 "$comment": "A number is valid only if it has a value greater than (not equal to) `exclusiveMinimum`.\n",
45 "from": "NumberValidator"
46 },
47 "maximum": {
48 "@id": "stencila:maximum",
49 "type": "number",
50 "description": "The inclusive upper limit for a numeric node.",
51 "$comment": "A number is valid if it is less than, or exactly equal to, `maximum`.\n",
52 "from": "NumberValidator"
53 },
54 "exclusiveMaximum": {
55 "@id": "stencila:exclusiveMaximum",
56 "type": "number",
57 "description": "The exclusive upper limit for a numeric node.",
58 "$comment": "A number is valid only if it has a value less than (not equal to) `exclusiveMaximum`.\n",
59 "from": "NumberValidator"
60 },
61 "multipleOf": {
62 "@id": "stencila:multipleOf",
63 "type": "number",
64 "exclusiveMinimum": 0,
65 "description": "A number that a numeric node must be a multiple of.",
66 "$comment": "A number is valid only if division by this value results in an integer.\n",
67 "from": "NumberValidator"
68 }
69 },
70 "file": "IntegerValidator.schema.yaml",
71 "children": [],
72 "descendants": [],
73 "$schema": "http://json-schema.org/draft-07/schema#",
74 "$id": "https://schema.stenci.la/v0/IntegerValidator.schema.json",
75 "source": "https://github.com/stencila/schema/blob/master/IntegerValidator.schema.yaml",
76 "type": "object",
77 "additionalProperties": false,
78 "required": [
79 "type"
80 ],
81 "propertyAliases": {}
82}