forked from chaosct/repovizz2doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
datapack_schema.json
115 lines (105 loc) · 3.66 KB
/
datapack_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "repovizz2/datapack",
"description": "Authoritative JSON schema for the repovizz2 datapack structure.",
"type": "object",
"properties": {
"info": {
"description": "Placeholder for generic information relative to the whole datapack.",
"type": "object",
"properties": {
"keywords": {
"description": "List of keywords identifying the datapack, for easy search and discovery.",
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"description": {
"title": "Datapack Description",
"type": "string"
},
"id": {
"title": "Datapack ID",
"$ref": "#/definitions/uuid"
},
"name": {
"title": "Datapack Name",
"type": "string"
},
"author": {
"title": "Datapack Author",
"type": "string"
}
},
"required": ["name", "author", "description", "keywords"]
},
"children": { "$ref": "#/definitions/nodeArray" }
},
"required": ["info", "children"],
"definitions": {
"uuid": {
"type": "string",
"pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
},
"node": {
"type": "object",
"properties": {
"class": {
"type": "string",
"enum": ["container", "data", "metadata"]
},
"name": { "type": "string" },
"text": { "type": "string" },
"id": { "$ref": "#/definitions/uuid" }
},
"required": ["class", "name", "text"]
},
"containerNode": {
"title": "Container Node",
"description": "Node that holds other nodes and serves as an organizational tool.",
"allOf": [
{ "$ref": "#/definitions/node" },
{
"properties": {
"class": {
"type": "string",
"pattern": "container"
},
"children": { "$ref": "#/definitions/nodeArray" }
},
"required": ["children"]
}
]
},
"dataNode": {
"title": "Data Node",
"description": "Node that holds a data pointer",
"allOf": [
{ "$ref": "#/definitions/node" },
{
"properties": {
"class": {
"type": "string",
"pattern": "data"
},
"type": { "$ref": "#/definitions/uuid" },
"meta": { "type": "object" },
"link": { "type": "string" }
},
"required": ["type", "link"]
}
]
},
"nodeArray": {
"title": "Node Array",
"description": "List of nodes, usually held within a Container Node.",
"type": "array",
"items": {
"oneOf": [
{ "$ref": "#/definitions/containerNode" },
{ "$ref": "#/definitions/dataNode" }
]
}
}
}
}