Skip to content

Commit 9023055

Browse files
add Revel Digital gadget definition schema (SchemaStore#4835)
* add Revel Digital gadget definition schema * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent f34a83f commit 9023055

File tree

3 files changed

+418
-0
lines changed

3 files changed

+418
-0
lines changed

src/api/json/catalog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8525,6 +8525,12 @@
85258525
],
85268526
"url": "https://raw.githubusercontent.com/ShaitanLyss/these/main/hecate/hecate-json-schema.json"
85278527
},
8528+
{
8529+
"name": "Revel Digital Gadget Definition File",
8530+
"description": "Revel Digital gadget definition file. See https://developer.reveldigital.com/gadgets for more information",
8531+
"fileMatch": ["gadget.yml", "gadget.yaml"],
8532+
"url": "https://www.schemastore.org/gadget-yaml.json"
8533+
},
85288534
{
85298535
"name": "Jujutsu (jj) VCS config",
85308536
"description": "Jujutsu (jj) configuration file",

src/schemas/json/gadget-yaml.json

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://www.schemastore.org/gadget-yaml.json",
4+
"title": "gadget.yaml",
5+
"description": "Schema for Revel Digital gadget.yaml files. See https://developer.reveldigital.com/gadgets for more information.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"properties": {
9+
"title": {
10+
"type": "string"
11+
},
12+
"title_url": {
13+
"type": ["string", "null"],
14+
"format": "uri"
15+
},
16+
"description": {
17+
"type": "string"
18+
},
19+
"author": {
20+
"type": "string"
21+
},
22+
"background": {
23+
"type": "string"
24+
},
25+
"requirements": {
26+
"type": "array",
27+
"items": {
28+
"type": "string"
29+
}
30+
},
31+
"locales": {
32+
"type": "array",
33+
"items": {
34+
"$ref": "#/definitions/Locale"
35+
}
36+
},
37+
"prefs": {
38+
"type": "array",
39+
"items": {
40+
"$ref": "#/definitions/Pref"
41+
}
42+
}
43+
},
44+
"required": [
45+
"author",
46+
"background",
47+
"description",
48+
"locales",
49+
"prefs",
50+
"requirements",
51+
"title",
52+
"title_url"
53+
],
54+
"definitions": {
55+
"Locale": {
56+
"type": "object",
57+
"additionalProperties": false,
58+
"properties": {
59+
"messages": {
60+
"type": "string",
61+
"format": "uri"
62+
},
63+
"lang": {
64+
"type": "string"
65+
}
66+
},
67+
"required": ["messages"],
68+
"title": "Locale"
69+
},
70+
"Pref": {
71+
"type": "object",
72+
"additionalProperties": false,
73+
"properties": {
74+
"name": {
75+
"type": "string"
76+
},
77+
"display_name": {
78+
"type": "string"
79+
},
80+
"datatype": {
81+
"type": "string"
82+
},
83+
"default_value": {
84+
"$ref": "#/definitions/DefaultValue"
85+
},
86+
"required": {
87+
"type": "boolean"
88+
},
89+
"options": {
90+
"type": "array",
91+
"items": {
92+
"$ref": "#/definitions/Option"
93+
}
94+
},
95+
"depends": {
96+
"type": "array",
97+
"items": {
98+
"$ref": "#/definitions/Depend"
99+
}
100+
},
101+
"multiple": {
102+
"type": "boolean"
103+
},
104+
"multiline": {
105+
"type": "boolean"
106+
}
107+
},
108+
"required": [
109+
"datatype",
110+
"default_value",
111+
"display_name",
112+
"name",
113+
"required"
114+
],
115+
"title": "Pref"
116+
},
117+
"Depend": {
118+
"type": "object",
119+
"additionalProperties": false,
120+
"properties": {
121+
"name": {
122+
"type": "string"
123+
},
124+
"any_of": {
125+
"type": "array",
126+
"items": {
127+
"$ref": "#/definitions/AnyOf"
128+
}
129+
},
130+
"all_of": {
131+
"type": "array",
132+
"items": {
133+
"$ref": "#/definitions/AllOf"
134+
}
135+
},
136+
"none_of": {
137+
"type": "array",
138+
"items": {
139+
"$ref": "#/definitions/NoneOf"
140+
}
141+
}
142+
},
143+
"required": ["name"],
144+
"title": "Depend"
145+
},
146+
"AnyOf": {
147+
"type": "object",
148+
"additionalProperties": false,
149+
"properties": {
150+
"values": {
151+
"type": "array",
152+
"items": {
153+
"type": "string"
154+
}
155+
}
156+
},
157+
"required": ["values"],
158+
"title": "AnyOf"
159+
},
160+
"AllOf": {
161+
"type": "object",
162+
"additionalProperties": false,
163+
"properties": {
164+
"values": {
165+
"type": "array",
166+
"items": {
167+
"type": "string"
168+
}
169+
}
170+
},
171+
"required": ["values"],
172+
"title": "AllOf"
173+
},
174+
"NoneOf": {
175+
"type": "object",
176+
"additionalProperties": false,
177+
"properties": {
178+
"values": {
179+
"type": "array",
180+
"items": {
181+
"type": "string"
182+
}
183+
}
184+
},
185+
"required": ["values"],
186+
"title": "NoneOf"
187+
},
188+
"Option": {
189+
"type": "object",
190+
"additionalProperties": false,
191+
"properties": {
192+
"display_value": {
193+
"type": "string"
194+
},
195+
"value": {
196+
"type": ["string", "null"]
197+
}
198+
},
199+
"required": ["display_value"],
200+
"title": "Option"
201+
},
202+
"DefaultValue": {
203+
"anyOf": [
204+
{
205+
"type": "boolean"
206+
},
207+
{
208+
"type": "number"
209+
},
210+
{
211+
"type": "null"
212+
},
213+
{
214+
"type": "string"
215+
}
216+
],
217+
"title": "DefaultValue"
218+
}
219+
}
220+
}

0 commit comments

Comments
 (0)