UNPKG

1.68 kBJSONView Raw
1{
2 "title": "ConstantValidator",
3 "@id": "stencila:ConstantValidator",
4 "extends": "Entity",
5 "role": "validation",
6 "status": "unstable",
7 "category": "data",
8 "description": "A validator specifying a constant value that a node must have.",
9 "$comment": "A node will be valid against this validator if it is equal to the\n`value` property. Analogous to the JSON Schema [`const` keyword](https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.1.3).\n",
10 "properties": {
11 "type": {
12 "@id": "schema:type",
13 "description": "The name of the type.",
14 "type": "string",
15 "enum": [
16 "ConstantValidator"
17 ],
18 "default": "ConstantValidator",
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 "value": {
34 "@id": "schema:value",
35 "description": "The value that the node must have.",
36 "allOf": [
37 {
38 "$ref": "Node.schema.json"
39 }
40 ],
41 "from": "ConstantValidator"
42 }
43 },
44 "file": "ConstantValidator.schema.yaml",
45 "children": [],
46 "descendants": [],
47 "$schema": "http://json-schema.org/draft-07/schema#",
48 "$id": "https://schema.stenci.la/v0/ConstantValidator.schema.json",
49 "source": "https://github.com/stencila/schema/blob/master/ConstantValidator.schema.yaml",
50 "type": "object",
51 "additionalProperties": false,
52 "required": [
53 "type"
54 ],
55 "propertyAliases": {}
56}