]> FriiDump Source - friidump.git/blob - tests/contracts/friidump-test-result.v1.schema.json
Harden GCC-4243N A102 HLDS E7 profile
[friidump.git] / tests / contracts / friidump-test-result.v1.schema.json
1 {
2   "$schema": "https://json-schema.org/draft/2020-12/schema",
3   "$id": "https://releases.jtryba.com/friidump/schemas/friidump-test-result.v1.schema.json",
4   "title": "FriiDump single-run test result",
5   "description": "One FriiDump execution using one drive and one disc.",
6   "type": "object",
7   "additionalProperties": false,
8   "required": [
9     "schema",
10     "format",
11     "generated_utc",
12     "generator",
13     "run",
14     "drive",
15     "media",
16     "seed",
17     "dump",
18     "hashes",
19     "reference",
20     "profile",
21     "notes",
22     "artifacts"
23   ],
24   "properties": {
25     "schema": {
26       "const": "friidump-test-result.v1"
27     },
28     "format": {
29       "type": "object",
30       "additionalProperties": false,
31       "required": [
32         "name",
33         "generation",
34         "serialization"
35       ],
36       "properties": {
37         "name": {
38           "const": "FriiDump Interchange Format"
39         },
40         "generation": {
41           "const": 1
42         },
43         "serialization": {
44           "const": "json"
45         }
46       }
47     },
48     "generated_utc": {
49       "type": "string",
50       "format": "date-time"
51     },
52     "generator": {
53       "type": "object",
54       "additionalProperties": false,
55       "required": [
56         "name",
57         "version",
58         "build_commit"
59       ],
60       "properties": {
61         "name": {
62           "const": "FriiDump"
63         },
64         "version": {
65           "type": "string",
66           "minLength": 1,
67           "maxLength": 80
68         },
69         "build_commit": {
70           "type": [
71             "string",
72             "null"
73           ],
74           "pattern": "^[0-9a-fA-F]{40}$"
75         }
76       }
77     },
78     "run": {
79       "type": "object",
80       "additionalProperties": false,
81       "required": [
82         "run_id",
83         "started_utc",
84         "completed_utc",
85         "test_type",
86         "result"
87       ],
88       "properties": {
89         "run_id": {
90           "type": "string",
91           "format": "uuid"
92         },
93         "started_utc": {
94           "type": [
95             "string",
96             "null"
97           ],
98           "format": "date-time"
99         },
100         "completed_utc": {
101           "type": [
102             "string",
103             "null"
104           ],
105           "format": "date-time"
106         },
107         "test_type": {
108           "enum": [
109             "full_dump",
110             "seed_only",
111             "partial_dump",
112             "diagnostic_no_media",
113             "diagnostic_wrong_media",
114             "media_transition",
115             "other"
116           ]
117         },
118         "result": {
119           "enum": [
120             "pass",
121             "partial",
122             "fail",
123             "not_applicable"
124           ]
125         }
126       }
127     },
128     "drive": {
129       "type": "object",
130       "additionalProperties": false,
131       "required": [
132         "vendor",
133         "model",
134         "firmware_revision",
135         "interface",
136         "device_path",
137         "firmware_modified",
138         "modification_note"
139       ],
140       "properties": {
141         "vendor": {
142           "type": "string",
143           "maxLength": 64
144         },
145         "model": {
146           "type": "string",
147           "minLength": 1,
148           "maxLength": 120
149         },
150         "firmware_revision": {
151           "type": "string",
152           "minLength": 1,
153           "maxLength": 64
154         },
155         "interface": {
156           "type": "string",
157           "maxLength": 40
158         },
159         "device_path": {
160           "type": [
161             "string",
162             "null"
163           ],
164           "maxLength": 255
165         },
166         "firmware_modified": {
167           "type": "boolean"
168         },
169         "modification_note": {
170           "type": [
171             "string",
172             "null"
173           ],
174           "maxLength": 1000
175         }
176       }
177     },
178     "media": {
179       "type": "object",
180       "additionalProperties": false,
181       "required": [
182         "platform",
183         "title",
184         "region",
185         "disc_id"
186       ],
187       "properties": {
188         "platform": {
189           "enum": [
190             "gamecube",
191             "wii",
192             "xbox",
193             "dvd",
194             "unknown"
195           ]
196         },
197         "title": {
198           "type": [
199             "string",
200             "null"
201           ],
202           "maxLength": 255
203         },
204         "region": {
205           "type": [
206             "string",
207             "null"
208           ],
209           "maxLength": 80
210         },
211         "disc_id": {
212           "type": [
213             "string",
214             "null"
215           ],
216           "maxLength": 120
217         }
218       }
219     },
220     "seed": {
221       "type": "object",
222       "additionalProperties": false,
223       "required": [
224         "attempted",
225         "result",
226         "duration_seconds"
227       ],
228       "properties": {
229         "attempted": {
230           "type": "boolean"
231         },
232         "result": {
233           "enum": [
234             "pass",
235             "partial",
236             "fail",
237             "not_attempted",
238             "not_applicable"
239           ]
240         },
241         "duration_seconds": {
242           "type": [
243             "number",
244             "null"
245           ],
246           "minimum": 0
247         }
248       }
249     },
250     "dump": {
251       "type": "object",
252       "additionalProperties": false,
253       "required": [
254         "attempted",
255         "result",
256         "sector_count",
257         "byte_count",
258         "duration_seconds",
259         "failure_stage",
260         "failure_sector",
261         "output_path"
262       ],
263       "properties": {
264         "attempted": {
265           "type": "boolean"
266         },
267         "result": {
268           "enum": [
269             "pass",
270             "partial",
271             "fail",
272             "not_attempted",
273             "not_applicable"
274           ]
275         },
276         "sector_count": {
277           "type": [
278             "integer",
279             "null"
280           ],
281           "minimum": 0
282         },
283         "byte_count": {
284           "type": [
285             "integer",
286             "null"
287           ],
288           "minimum": 0
289         },
290         "duration_seconds": {
291           "type": [
292             "number",
293             "null"
294           ],
295           "minimum": 0
296         },
297         "failure_stage": {
298           "type": [
299             "string",
300             "null"
301           ],
302           "maxLength": 160
303         },
304         "failure_sector": {
305           "type": [
306             "integer",
307             "null"
308           ],
309           "minimum": 0
310         },
311         "output_path": {
312           "type": [
313             "string",
314             "null"
315           ],
316           "maxLength": 1024
317         }
318       }
319     },
320     "hashes": {
321       "type": "object",
322       "additionalProperties": false,
323       "required": [
324         "crc32",
325         "md5",
326         "sha1",
327         "sha256"
328       ],
329       "properties": {
330         "crc32": {
331           "type": [
332             "string",
333             "null"
334           ],
335           "pattern": "^[0-9a-fA-F]{8}$"
336         },
337         "md5": {
338           "type": [
339             "string",
340             "null"
341           ],
342           "pattern": "^[0-9a-fA-F]{32}$"
343         },
344         "sha1": {
345           "type": [
346             "string",
347             "null"
348           ],
349           "pattern": "^[0-9a-fA-F]{40}$"
350         },
351         "sha256": {
352           "type": [
353             "string",
354             "null"
355           ],
356           "pattern": "^[0-9a-fA-F]{64}$"
357         }
358       }
359     },
360     "reference": {
361       "type": "object",
362       "additionalProperties": false,
363       "required": [
364         "provider",
365         "result",
366         "reference_id"
367       ],
368       "properties": {
369         "provider": {
370           "type": [
371             "string",
372             "null"
373           ],
374           "maxLength": 80
375         },
376         "result": {
377           "enum": [
378             "match",
379             "mismatch",
380             "not_checked",
381             "not_applicable"
382           ]
383         },
384         "reference_id": {
385           "type": [
386             "string",
387             "null"
388           ],
389           "maxLength": 160
390         }
391       }
392     },
393     "profile": {
394       "type": "object",
395       "additionalProperties": false,
396       "required": [
397         "support_tier",
398         "cdb_offset",
399         "gate_address"
400       ],
401       "properties": {
402         "support_tier": {
403           "type": [
404             "string",
405             "null"
406           ],
407           "maxLength": 120
408         },
409         "cdb_offset": {
410           "type": [
411             "string",
412             "null"
413           ],
414           "pattern": "^0x[0-9a-fA-F]+$"
415         },
416         "gate_address": {
417           "type": [
418             "string",
419             "null"
420           ],
421           "pattern": "^0x[0-9a-fA-F]+$"
422         }
423       }
424     },
425     "notes": {
426       "type": "array",
427       "items": {
428         "type": "string",
429         "maxLength": 2000
430       },
431       "maxItems": 100
432     },
433     "artifacts": {
434       "type": "array",
435       "maxItems": 100,
436       "items": {
437         "type": "object",
438         "additionalProperties": false,
439         "required": [
440           "type",
441           "path",
442           "bytes",
443           "sha256"
444         ],
445         "properties": {
446           "type": {
447             "type": "string",
448             "minLength": 1,
449             "maxLength": 80
450           },
451           "path": {
452             "type": [
453               "string",
454               "null"
455             ],
456             "maxLength": 1024
457           },
458           "bytes": {
459             "type": [
460               "integer",
461               "null"
462             ],
463             "minimum": 0
464           },
465           "sha256": {
466             "type": [
467               "string",
468               "null"
469             ],
470             "pattern": "^[0-9a-fA-F]{64}$"
471           }
472         }
473       }
474     }
475   }
476 }