diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/schemas/api_keyboard.jsonschema | 35 | ||||
-rw-r--r-- | data/schemas/false.jsonschema | 1 | ||||
-rw-r--r-- | data/schemas/keyboard.jsonschema | 291 | ||||
-rw-r--r-- | data/schemas/true.jsonschema | 1 |
4 files changed, 328 insertions, 0 deletions
diff --git a/data/schemas/api_keyboard.jsonschema b/data/schemas/api_keyboard.jsonschema new file mode 100644 index 000000000..d570ee999 --- /dev/null +++ b/data/schemas/api_keyboard.jsonschema | |||
@@ -0,0 +1,35 @@ | |||
1 | { | ||
2 | "allOf": [ | ||
3 | { "$ref": "qmk.keyboard.v1" }, | ||
4 | { | ||
5 | "$id": "qmk.api.keyboard.v1", | ||
6 | "keymaps": { | ||
7 | "type": "string" | ||
8 | }, | ||
9 | "parse_errors": { | ||
10 | "type": "array", | ||
11 | "items": { | ||
12 | "type": "string" | ||
13 | } | ||
14 | }, | ||
15 | "parse_warnings": { | ||
16 | "type": "array", | ||
17 | "items": { | ||
18 | "type": "string" | ||
19 | } | ||
20 | }, | ||
21 | "processor_type": { | ||
22 | "type": "string" | ||
23 | }, | ||
24 | "protocol": { | ||
25 | "type": "string" | ||
26 | }, | ||
27 | "keyboard_folder": { | ||
28 | "type": "string" | ||
29 | }, | ||
30 | "platform": { | ||
31 | "type": "string" | ||
32 | } | ||
33 | } | ||
34 | ] | ||
35 | } | ||
diff --git a/data/schemas/false.jsonschema b/data/schemas/false.jsonschema new file mode 100644 index 000000000..c508d5366 --- /dev/null +++ b/data/schemas/false.jsonschema | |||
@@ -0,0 +1 @@ | |||
false | |||
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema new file mode 100644 index 000000000..e13771e92 --- /dev/null +++ b/data/schemas/keyboard.jsonschema | |||
@@ -0,0 +1,291 @@ | |||
1 | { | ||
2 | "$schema": "http://json-schema.org/schema#", | ||
3 | "$id": "qmk.keyboard.v1", | ||
4 | "title": "Keyboard Information", | ||
5 | "type": "object", | ||
6 | "properties": { | ||
7 | "keyboard_name": { | ||
8 | "type": "string", | ||
9 | "minLength": 2, | ||
10 | "maxLength": 250 | ||
11 | }, | ||
12 | "maintainer": { | ||
13 | "type": "string", | ||
14 | "minLength": 2, | ||
15 | "maxLength": 250 | ||
16 | }, | ||
17 | "manufacturer": { | ||
18 | "type": "string", | ||
19 | "minLength": 2, | ||
20 | "maxLength": 250 | ||
21 | }, | ||
22 | "url": { | ||
23 | "type": "string", | ||
24 | "format": "uri" | ||
25 | }, | ||
26 | "processor": { | ||
27 | "type": "string", | ||
28 | "enum": ["MK20DX128", "MK20DX256", "MKL26Z64", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "at90usb1286", "at90usb646", "atmega16u2", "atmega328p", "atmega32a", "atmega32u2", "atmega32u4", "attiny85", "cortex-m4"] | ||
29 | }, | ||
30 | "bootloader": { | ||
31 | "type": "string", | ||
32 | "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp"] | ||
33 | }, | ||
34 | "diode_direction": { | ||
35 | "type": "string", | ||
36 | "enum": ["COL2ROW", "ROW2COL"] | ||
37 | }, | ||
38 | "debounce": { | ||
39 | "type": "number", | ||
40 | "min": 0, | ||
41 | "multipleOf": 1 | ||
42 | }, | ||
43 | "height": { | ||
44 | "type": "number", | ||
45 | "min": 0.25 | ||
46 | }, | ||
47 | "width": { | ||
48 | "type": "number", | ||
49 | "min": 0.25 | ||
50 | }, | ||
51 | "community_layouts": { | ||
52 | "type": "array", | ||
53 | "items": { | ||
54 | "type": "string", | ||
55 | "minLength": 2, | ||
56 | "pattern": "^[0-9a-z_]*$" | ||
57 | } | ||
58 | }, | ||
59 | "features": { | ||
60 | "type": "object", | ||
61 | "additionalProperties": {"type": "boolean"} | ||
62 | }, | ||
63 | "indicators": { | ||
64 | "type": "object", | ||
65 | "properties": { | ||
66 | "caps_lock": { | ||
67 | "type": "string", | ||
68 | "pattern": "^[A-K]\\d{1,2}$" | ||
69 | }, | ||
70 | "num_lock": { | ||
71 | "type": "string", | ||
72 | "pattern": "^[A-K]\\d{1,2}$" | ||
73 | }, | ||
74 | "scroll_lock": { | ||
75 | "type": "string", | ||
76 | "pattern": "^[A-K]\\d{1,2}$" | ||
77 | } | ||
78 | } | ||
79 | }, | ||
80 | "layout_aliases": { | ||
81 | "type": "object", | ||
82 | "additionalProperties": { | ||
83 | "type": "string", | ||
84 | "pattern": "^LAYOUT_[0-9a-z_]*$" | ||
85 | } | ||
86 | }, | ||
87 | "layouts": { | ||
88 | "type": "object", | ||
89 | "additionalProperties": { | ||
90 | "type": "object", | ||
91 | "additionalProperties": false, | ||
92 | "properties": { | ||
93 | "filename": { | ||
94 | "type": "string" | ||
95 | }, | ||
96 | "c_macro": { | ||
97 | "type": "boolean" | ||
98 | }, | ||
99 | "key_count": { | ||
100 | "type": "number", | ||
101 | "min": 0, | ||
102 | "multipleOf": 1 | ||
103 | }, | ||
104 | "layout": { | ||
105 | "type": "array", | ||
106 | "items": { | ||
107 | "type": "object", | ||
108 | "additionalProperties": false, | ||
109 | "properties": { | ||
110 | "label": {"type": "string"}, | ||
111 | "matrix": { | ||
112 | "type": "array", | ||
113 | "minItems": 2, | ||
114 | "maxItems": 2, | ||
115 | "items": { | ||
116 | "type": "number", | ||
117 | "min": 0, | ||
118 | "multipleOf": 1 | ||
119 | } | ||
120 | }, | ||
121 | "h": { | ||
122 | "type": "number", | ||
123 | "min": 0.25 | ||
124 | }, | ||
125 | "r": { | ||
126 | "type": "number", | ||
127 | "min": 0 | ||
128 | }, | ||
129 | "rx": { | ||
130 | "type": "number", | ||
131 | "min": 0 | ||
132 | }, | ||
133 | "ry": { | ||
134 | "type": "number", | ||
135 | "min": 0 | ||
136 | }, | ||
137 | "w": { | ||
138 | "type": "number", | ||
139 | "min": 0.25 | ||
140 | }, | ||
141 | "x": { | ||
142 | "type": "number", | ||
143 | "min": 0 | ||
144 | }, | ||
145 | "y": { | ||
146 | "type": "number", | ||
147 | "min": 0 | ||
148 | } | ||
149 | } | ||
150 | } | ||
151 | } | ||
152 | } | ||
153 | } | ||
154 | }, | ||
155 | "matrix_pins": { | ||
156 | "type": "object", | ||
157 | "additionalProperties": false, | ||
158 | "properties": { | ||
159 | "direct": { | ||
160 | "type": "array", | ||
161 | "items": { | ||
162 | "type": "array", | ||
163 | "items": { | ||
164 | "oneOf": [ | ||
165 | { | ||
166 | "type": "string", | ||
167 | "pattern": "^[A-K]\\d{1,2}$" | ||
168 | }, | ||
169 | { | ||
170 | "type": "number", | ||
171 | "multipleOf": 1 | ||
172 | }, | ||
173 | { | ||
174 | "type": "null" | ||
175 | } | ||
176 | ] | ||
177 | } | ||
178 | } | ||
179 | }, | ||
180 | "cols": { | ||
181 | "type": "array", | ||
182 | "items": { | ||
183 | "oneOf": [ | ||
184 | { | ||
185 | "type": "string", | ||
186 | "pattern": "^[A-K]\\d{1,2}$" | ||
187 | }, | ||
188 | { | ||
189 | "type": "number", | ||
190 | "multipleOf": 1 | ||
191 | }, | ||
192 | { | ||
193 | "type": "null" | ||
194 | } | ||
195 | ] | ||
196 | } | ||
197 | }, | ||
198 | "rows": { | ||
199 | "type": "array", | ||
200 | "items": { | ||
201 | "oneOf": [ | ||
202 | { | ||
203 | "type": "string", | ||
204 | "pattern": "^[A-K]\\d{1,2}$" | ||
205 | }, | ||
206 | { | ||
207 | "type": "number", | ||
208 | "multipleOf": 1 | ||
209 | }, | ||
210 | { | ||
211 | "type": "null" | ||
212 | } | ||
213 | ] | ||
214 | } | ||
215 | } | ||
216 | } | ||
217 | }, | ||
218 | "rgblight": { | ||
219 | "type": "object", | ||
220 | "additionalProperties": false, | ||
221 | "properties": { | ||
222 | "animations": { | ||
223 | "type": "object", | ||
224 | "additionalProperties": { | ||
225 | "type": "boolean" | ||
226 | } | ||
227 | }, | ||
228 | "brightness_steps": { | ||
229 | "type": "number", | ||
230 | "min": 0, | ||
231 | "multipleOf": 1 | ||
232 | }, | ||
233 | "hue_steps": { | ||
234 | "type": "number", | ||
235 | "min": 0, | ||
236 | "multipleOf": 1 | ||
237 | }, | ||
238 | "led_count": { | ||
239 | "type": "number", | ||
240 | "min": 0, | ||
241 | "multipleOf": 1 | ||
242 | }, | ||
243 | "max_brightness": { | ||
244 | "type": "number", | ||
245 | "min": 0, | ||
246 | "max": 255, | ||
247 | "multipleOf": 1 | ||
248 | }, | ||
249 | "pin": { | ||
250 | "type": "string", | ||
251 | "pattern": "^[A-K]\\d{1,2}$" | ||
252 | }, | ||
253 | "saturation_steps": { | ||
254 | "type": "number", | ||
255 | "min": 0, | ||
256 | "multipleOf": 1 | ||
257 | }, | ||
258 | "sleep": {"type": "boolean"}, | ||
259 | "split": {"type": "boolean"}, | ||
260 | "split_count": { | ||
261 | "type": "array", | ||
262 | "minLength": 2, | ||
263 | "maxLength": 2, | ||
264 | "items": { | ||
265 | "type": "number", | ||
266 | "min": 0, | ||
267 | "multipleOf": 1 | ||
268 | } | ||
269 | } | ||
270 | } | ||
271 | }, | ||
272 | "usb": { | ||
273 | "type": "object", | ||
274 | "additionalProperties": false, | ||
275 | "properties": { | ||
276 | "device_ver": { | ||
277 | "type": "string", | ||
278 | "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" | ||
279 | }, | ||
280 | "pid": { | ||
281 | "type": "string", | ||
282 | "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" | ||
283 | }, | ||
284 | "vid": { | ||
285 | "type": "string", | ||
286 | "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" | ||
287 | } | ||
288 | } | ||
289 | } | ||
290 | } | ||
291 | } | ||
diff --git a/data/schemas/true.jsonschema b/data/schemas/true.jsonschema new file mode 100644 index 000000000..27ba77dda --- /dev/null +++ b/data/schemas/true.jsonschema | |||
@@ -0,0 +1 @@ | |||
true | |||