UNPKG

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