forked from iop-alliance/OpenKnowHow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathokh.schema.json
586 lines (586 loc) · 22.7 KB
/
okh.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/OPEN-NEXT/OKH-LOSH/master/okh-losh.schema.json",
"title": "Manifest",
"description": "This is a JSON schema, which can validate a 'okh.toml' file, which holds a projects Open Know-How (Open Source Hardware) meta-data.",
"$comment": "NOTE: The properies 'ui-hidden' and 'ui-recommended' used in this schema, are non-standardised, and currently unused. They could be used to create a form, and are here for consistency with <https://git.iostud.io/makernet/iop-cdb/-/blob/dev/server/assets/okh.okhdf>.",
"type": "object",
"properties": {
"okhv": {
"description": "The version of the standard this manifest follows",
"type": "string",
"const": "OKH-LOSHv1.0",
"ui-hidden": true
},
"name": {
"$ref": "#/$defs/name"
},
"repo": {
"description": "URL to the repository in which the technical documentation is developed",
"$ref": "#/$defs/webUrl"
},
"version": {
"description": "version of the module, following the [semantic versioning-scheme v2.0.0](https://semver.org/#semantic-versioning-200)",
"type": ["string", "number"],
"examples": [
"2.3.4",
"0.0.1-24-g6a8a3a7",
"v0.3.1",
"6a8a3a7",
61
]
},
"release": {
"description": "URL or repo local path to the release package of this version of the OSH module",
"$ref": "#/$defs/relPathOrWebUrl"
},
"license": {
"description": "[SPDX ID](https://spdx.org/licenses/) of the license used - if no SPDX key is available yet, use URL to legal code of the license instead - NOTE: When no SPDX key is found by the crawler, metadata won't be uploaded to LOSH until the alternative license has been whitelisted by maintainers. At LOSH we need to make sure that all results are actually open source.",
"$ref": "#/$defs/spdxLicenseExpression",
"examples": [
"GPL-3.0-or-later",
"AGPL-3.0-or-later",
"GPL-3.0-only",
"AGPL-3.0-only",
"0BSD",
"CC0-1.0",
"CC-BY-SA-4.0",
"CC-BY-4.0",
"Unlicense"
]
},
"licensor": {
"description": "licensor (usually the originator) of the OSH module",
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"examples": [
"John Doe <[email protected]> - FSF",
"Jane Doe <[email protected]> - FSF",
"Michael Mueller <[email protected]> - OSI",
"Jinz Jixxer <[email protected]> - OSI",
"Pru Ner <[email protected]> - GNU"
]
},
"organisation": {
"description": "organisation of the licensor",
"type": "string",
"examples": [
"Free Software Foundation",
"Open Source Initiative",
"Open Source Hardware Association",
"Open Source Ecology",
"Open Source Ecology Germany"
]
},
"readme": {
"description": "repo-relative path to the readme file",
"$ref": "#/$defs/relPathOrWebUrl",
"examples": [
"README.md",
"README",
"README-JP.md",
"README-JP"
]
},
"contribution-guide": {
"description": "repo-relative path to the contribution guide",
"$ref": "#/$defs/relPathOrWebUrl",
"examples": [
"CONTRIBUTING.md",
"CONTRIB.md",
"CONTRIBUTING",
"CONTRIB"
]
},
"image": {
"$ref": "#/$defs/image"
},
"documentation-language": {
"description": "IETF BCP 47 language tag for the language in which the documentation is written",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/$defs/language"
}
},
{ "$ref": "#/$defs/language" }
]
},
"technology-readiness-level": {
"description": "OTRL-ID representing the development stage of the OSH module; get it from: <https://w3id.org/oseg/ont/otrl>",
"oneOf": [
{"const": "OTRL-1", "title": "Ideation", "description": "Product idea; needs are identified and initial specifications are defined"},
{"const": "OTRL-2", "title": "Conception", "description": "Mature product concept has been formulated"},
{"const": "OTRL-3", "title": "Development", "description": "Product model is developed"},
{"const": "OTRL-4", "title": "Prototyping and testing", "description": "Full functional prototype is built and tested"},
{"const": "OTRL-5", "title": "Manufacturing development", "description": "Fairly reliable processes identified and characterised"},
{"const": "OTRL-6", "title": "Product qualification", "description": "Certificate marking conformity assessment or comparable"}
],
"default": "OTRL-1"
},
"documentation-readiness-level": {
"description": "ODRL-ID representing the development stage of the documentation; get it from: <https://w3id.org/oseg/ont/otrl>",
"oneOf": [
{"const": "ODRL-1", "title": "Documentation process commenced", "description": "Published information under free open source licence"},
{"const": "ODRL-2", "title": "Collaborative documentation in progress", "description": "Provision of documentation files and in editable formats enabling collaboration development"},
{"const": "ODRL-3", "title": "Full documentation published", "description": "Complete documentation as per DIN SPEC 3105-1"},
{"const": "ODRL-3*", "title": "Full documentation published & audited", "description": "Public evidence of documentation maturity"},
{"const": "ODRL-4", "title": "Full documentation for product qualification", "description": "Product qualification documents published enabling decentralised commercial distribution"}
],
"default": "ODRL-1"
},
"attestation": {
"description": "reference to one or multiple valid attestation(s) that the documentation is complete and fully qualifies as open source hardware;\\\nissuing conformity assessment bodies according to DIN SPEC 3105-2:\\\n- [Open Hardware Observatory](https://en.oho.wiki/wiki/Request_certification_for_your_project)\\\n- [Open Source Ecology Germany](https://gitlab.opensourceecology.de/verein/projekte/cab/CAB)\\\n- [OSHWA certification programme](https://certification.oshwa.org/)",
"anyOf": [
{
"$ref": "#/$defs/relPathOrWebUrl"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/relPathOrWebUrl"
}
}
]
},
"function": {
"description": "functional description, e.g. what it actually does, what problem it solves, for whom, under which conditions etc.\\\nSo if you wish that someone finds & uses your OSH specifically e.g. for COVID-19-crisis response, include relevant keywords in this field",
"type": "string",
"examples": [
"A fully programmable, impeccably built, open source, split mechanical keyboard designed for extreme productivity and ergonomics.",
"A Handibot tool is a new kind of portable, digitally-controlled power tool for cutting, drilling, carving, and many other machining operations - the first Universal Digital Power Tool (UDPT) - or just, a Smart Tool. If you're familiar with industrial CNC (computer numerically controlled) equipment, think of the Handibot tool as a portable version of CNC. ",
"A tandem bicycle, with practically the same size, weight, and cost of a standard bicycle.",
"CARLA is a resistant bicycle trailer, which can be coupled with any regular bike and can transport easily 150 kg load. CARLA distinguishes itself for the outstanding agility and a very small turning circle. CARLA bicycle trailer is very well in tune with e-bikes for example, with a mid-motor.",
"FarmBot Genesis is top-of-the-line FarmBot model designed with the most features and flexibility. It is suitable for growing food with the highest level of precision, running complex experiments, and capable of being easily modified and extended to do more.",
"Flipper Zero is a multi tool device for geeks with a curious personality of a cyber-dolphin who really loves to hack. It can interact with digital systems in real life and grow while you are hacking. The idea of Flipper Zero is to combine all the phreaking hardware tools you'd need for hacking on the go.",
"GEK Gasifier comes as an assemble-yourself kit that provides stand-alone wood gas for a variety of end uses.",
"Inkplate 6 is a powerful, Wi-Fi enabled ESP32 based six-inch e-paper display - recycled from a Kindle e-reader.",
"KORUZA innovates the design of a free-space optical communication system reusing mass produced Small Form-factor Pluggable (SFP) electro-optical transceivers, combining the latest advances in low-cost 3D printing using the Fused Deposition Modelling (F DM) method with bare-minimum custom electronics design.",
"LittleRP is an Open Source Resin 3D Printer ",
"mechanical setup for the COSI Measure",
"MNT Reform is the radical, ultimate open hardware laptop, designed and assembled in Berlin.",
"OpenEVSE supplies open source charging station hardware and software solutions to manufactures and individuals. ",
"OpenROV is a DIY telerobotics community centered around underwater exploration & adventure.",
"Opentrons makes robots for biologists. The robots automate experiments that would otherwise be done by hand, allowing our users to spend more time pursuing answers to the 21st century's most important questions, and less time pipetting.",
"The AXIOM Beta is an open source, open hardware, professional-grade digital film camera made by apertus°. It is designed to be modular e.g. interchangeable sensor front end etc. and supports recording at 4K resolution.",
"The Corne is a 40% split mechanical USB general purpose keyboard. It is made up of two halves with 3x6 column staggered keys and 3 thumb keys. It has full RGB backlighting, and is fully programmable using the popular Open Source QMK firmware. The basic design principles are, to have a minimal, ergonomically arranged set of keys that are all reachable by moving a finger by at most a distance of one key in diagonal.",
"The Corne keyboard is a split keyboard with 3x6 column staggered keys and 3 thumb keys, based on Helix. Crkbd stands for Corne Keyboard.",
"The Electric Eel Wheel is an affordable electric spinning wheel that is revolutionizing the fiber world! The uptake is controlled with a unique scotch tension design and the yarn flows through a clever flyer assembly. It is an extremely light and portable design.",
"The goal of GliaX-Faceshield is to create a low cost, high quality, reusable face shield that can be quickly deployed.",
"The Lasersaur is a beautiful laser cutter with an outstanding price-performance ratio. We designed it to fill the need of makers, designers, architects and researchers who want a safe and highly-capable machine. Unlike others it's open source and comes fully loaded with knowledge to run, maintain, and modify.",
"The robot having functional characterisctics of animal such as Run, Walk, Crawl, Walk and run in different heights and take push ups operated autonomously and via android app.",
"This charge controller is a so-called maximum power point tracker (MPPT), which automatically adapts its input voltage to the connected solar panel to extracts as much power as possible. The MPPT function can only be achieved using a DC/DC converter, which is the core part of the charge controller PCB. It can be recognized by the large inductor and the large electrolytic input and output filter capacitors."
]
},
"standard-compliance": {
"description": "document-number of the official standard the OSH module complies;\\\nmultiple inputs possible (with one entry each)",
"type": "array",
"items": {
"type": "string"
},
"examples": [
"DIN EN 1335",
"ISO 1337"
]
},
"cpc-patent-class": {
"description": "patent class identifier of the Cooperative Patent Classification that describes best the field of technology of the OSH module.\\\nGet it from here: <https://worldwide.espacenet.com/classification>",
"$ref": "#/$defs/cpcId"
},
"tsdc": {
"$ref": "#/$defs/tsdc"
},
"bom": {
"$ref": "#/$defs/bom"
},
"manufacturing-instructions": {
"description": "URL or repo-relative path to manufacturing instructions; multiple inputs possible (with one entry each)",
"anyOf": [
{
"$ref": "#/$defs/relPathOrWebUrl"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/relPathOrWebUrl"
}
}
],
"examples": [
"Documentation/Assembly_Guide/AssemblyGuide.md"
]
},
"user-manual": {
"description": "URL or repo-relative path to user manual",
"$ref": "#/$defs/relPathOrWebUrl",
"examples": [
"Documentation/User_Guide/UserGuide.md"
]
},
"outer-dimensions": {
"$ref": "#/$defs/outerDimensions"
},
"mass": {
"$ref": "#/$defs/mass"
},
"source": {
"$ref": "#/$defs/source"
},
"export": {
"$ref": "#/$defs/export"
},
"auxiliary": {
"$ref": "#/$defs/auxiliary"
},
"part": {
"description": "physical component of this open source hardware module, for which technical documentation (design files etc.) is available under a free/open license",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"$ref": "#/$defs/name"
},
"image": {
"$ref": "#/$defs/image"
},
"tsdc": {
"$ref": "#/$defs/tsdc"
},
"source": {
"$ref": "#/$defs/source"
},
"export": {
"$ref": "#/$defs/export"
},
"auxiliary": {
"$ref": "#/$defs/auxiliary"
},
"outer-dimensions": {
"$ref": "#/$defs/outerDimensions"
},
"mass": {
"$ref": "#/$defs/mass"
}
},
"allOf": [
{ "required": [ "name" ] },
{
"anyOf": [
{ "required": [ "source" ] },
{ "required": [ "export" ] }
]
}
]
}
},
"software": {
"description": "associated software package used to operate this piece of open source hardware",
"type": "array",
"items": {
"type": "object",
"properties": {
"release": {
"description": "unambiguous reference to the software release used for this version of the OSH module",
"$ref": "#/$defs/relPathOrWebUrl",
"examples": [
"https://github.com/arduino/ArduinoCore-mbed/releases/tag/1.3.2"
]
},
"installation-guide": {
"description": "unambiguous refrence to the installation guide for the corresponding software release",
"$ref": "#/$defs/relPathOrWebUrl",
"examples": [
"https://github.com/arduino/ArduinoCore-mbed/blob/a2c06d768f5ebb6821ae6505b2032ee58f4ef70d/README.md"
]
}
},
"required": [ "release" ]
}
}
},
"$defs": {
"webUrl": {
"type": "string",
"format": "uri",
"pattern": "^https?://"
},
"relPath": {
"type": "string",
"$comment": "A relative file-path to a dir or file below the root - as much as one can check for that with a regex",
"not": {
"anyOf": [
{
"$comment": "no protocol",
"pattern": "^[a-z]*:"
},
{
"$comment": "no URL-absolute path without protocol",
"pattern": "^//"
},
{
"$comment": "no parent-dir-references",
"pattern": "(?:.*/)?\\.\\.(?:/.*)?"
}
]
}
},
"relPathOrWebUrl": {
"type": "string",
"anyOf": [
{
"$comment": "A full web URL",
"format": "uri",
"pattern": "^https?://"
},
{
"$ref": "#/$defs/relPath"
}
]
},
"cpcId": {
"$comment": "Get a CPC-ID from here <https://worldwide.espacenet.com/classification>",
"type": "string",
"pattern": "^[A-HY][0-9]{2}[A-HJ-NP-Z]( ?[12]?[0-9]{1,3}[/][0-9]{2,6})?$",
"examples": [
"A01B33/00",
"A41G",
"A01",
"A",
"B23K",
"B25J9/026",
"B62K",
"B63C",
"D03D 35/00",
"D03D 5/00",
"D06B",
"F16M 11/2078",
"F16M11/2078",
"G01N",
"G05B",
"G06C 7/02",
"H01H",
"H01Q",
"H02J",
"H02J 1/00",
"H04",
"H04W",
"H05K",
"Y02P",
"H02J 1/00",
"H02J 1/12",
"H02J 1/123",
"H02J 1/1234",
"H02J 1/12345",
"H02J 1/123456"
]
},
"email": {
"type": "string",
"format": "email",
"examples": [
]
},
"date": {
"type": "string",
"format": "date",
"examples": [
"2000-04-06",
"0001-0-0",
"1984-10-1"
]
},
"language": {
"description": "Language as a BCP 47 language tag",
"type": "string",
"pattern": "^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUse>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUse>x(-[A-Za-z0-9]{1,8})+))$",
"examples": [
"en",
"de",
"es",
"zh"
],
"autocomplete": true
},
"spdxLicenseExpression": {
"description": "A valid SPDX license expression",
"$comment": "TODO We would have to define this in an extra schema, generated -> do it in the SPDX-Identifiers-generater repo! -> NOPE -> already exists! see https://github.com/spdx/spdx-spec/issues/484#issuecomment-720817111 .. sounds like it needs to be improved, though -> .. ahh nope, it does not solve our issue, but checks SPDX documents for validity",
"type": "string"
},
"name": {
"description": "working title of the OSH module",
"type": "string"
},
"image": {
"description": "relative or absolute path to one (!) representative image of the OSH module",
"anyOf": [
{
"$ref": "#/$defs/relPathOrWebUrl"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/relPathOrWebUrl"
}
}
]
},
"tsdc": {
"description": "identifier of the applying Technology-specific Documentation Criteria (TsDC) according to DIN SPEC 3105-1 - get it from: <https://w3id.org/oseg/ont/tsdc/core> - multiple inputs possible (with one entry each)",
"type": [ "array", "string" ],
"items": {
"type": "string"
},
"examples": [
"ASM",
"MEC",
"CIR",
"PCB",
"WEL",
"3DP",
"LAS",
"CNC"
],
"autocomplete": true
},
"bom": {
"description": "URL or repo-relative path to the bill of materials",
"$ref": "#/$defs/relPathOrWebUrl",
"examples": [
"sBoM.csv",
"BOM.csv",
"bom.csv"
]
},
"source": {
"description": "relative or absolute path to source file (e.g. native CAD file);\\\nmultiple inputs possible (with one entry each)",
"type": [ "array", "string" ],
"items": {
"type": "string",
"$comment": "TODO type should rather be ~ $ref:relPath"
},
"examples": [
"3D-parts/assembly.asm",
"pcb/main.pro",
"pcb/main.kicad_pcb",
"cad/part-x/model.fcstd"
]
},
"export": {
"description": "relative or absolute path to export file (e.g. STEP export of 3D model or PDF export of drawing);\\\nmultiple inputs possible (with one entry each)",
"type": [ "array", "string" ],
"items": {
"$ref": "#/$defs/relPathOrWebUrl"
},
"examples": [
"3D-parts/assembly.stp",
"public/user-manual.pdf"
]
},
"auxiliary": {
"description": "relative or absolute path to files that are neither source files nor their exports, but still useful in the repository (e.g. KiCAD library files);\\\nmultiple inputs possible (with one entry each)",
"type": "array",
"items": {
"$ref": "#/$defs/relPathOrWebUrl"
},
"examples": [
"lib/lib1.lib",
".mdlrc"
]
},
"outerDimensions": {
"description": "Outer dimensions of the OSH module or part in mm, which completely encompass the product.",
"type": "object",
"properties": {
"width": { "type": "float" },
"depth": { "type": "float" },
"height": { "type": "float" }
},
"required": [ "width", "depth", "height" ]
},
"mass": {
"description": "Mass of the part in g.",
"type": "number"
}
},
"required": [
"okhv",
"name",
"repo",
"version",
"license",
"licensor",
"function"
],
"allOf": [
{
"if": {
"properties": {
"tsdc": { "type": "array", "contains": { "const": "3DP" } }
},
"required": ["tsdc"]
},
"then": {
"properties": {
"printing-process": {
"enum": ["FDM", "SLA", "SLS", "MJF", "DMLS"]
},
"matrial": {
"type": "string"
}
}
}
},
{
"if": {
"properties": {
"tsdc": { "type": "array", "contains": { "const": "PCB" } }
},
"required": ["tsdc"]
},
"then": {
"properties": {
"2d-size-mm": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"component-sides": {
"type": "number"
}
}
}
}
],
"propertiesOrder": [
".*",
"tsdc",
"printing-process",
"matrial",
"2d-size-mm",
"component-sides",
"bom"
],
"errorMessage": {
"required": "This property is required",
"properties": {
"repo": "Not a valid repo"
}
}
}