/
generic_widget_definition_schema.json
47 lines (47 loc) · 1.5 KB
/
generic_widget_definition_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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Generic Widget Definition Schema",
"type": "object",
"description": "The generic shape a widget definition must contain",
"additionalProperties": false,
"required": ["type", "name", "version", "definition"],
"properties": {
"name": {
"type": "string",
"description": "The name of the WidgetDefinition, eg ERM Agreements"
},
"version": {
"type": "string",
"description": "The version of this WidgetDefinition, of the form 1.0",
"pattern": "^(0|(?:[1-9]\\d*))\\.(0|(?:[1-9]\\d*))$"
},
"type": { "$ref": "#/$defs/type" },
"definition": { "$ref": "#/$defs/definition" }
},
"$defs": {
"type": {
"type": "object",
"title": "Widget Definition Type",
"description": "The WidgetType that this definition is created for",
"additionalProperties": false,
"required": ["name", "version"],
"properties": {
"name": {
"type": "string",
"description": "The name of the relevant WidgetType"
},
"version": {
"type": "string",
"description": "The version of the relevant WidgetType, of the form 1.0",
"pattern": "^(0|(?:[1-9]\\d*))\\.(0|(?:[1-9]\\d*))$"
}
}
},
"definition": {
"type": "object",
"title": "Widget Definition",
"description": "The actual JSON definition of an example widget for the specified type",
"additionalProperties": true
}
}
}