This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtool.schema.json
135 lines (133 loc) · 5.7 KB
/
tool.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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/FuReSH/tool-storage-metadata/v0.1.0/schemas/tool.schema.json",
"title": "Tool",
"description": "A schema to rudimentary describe a digital tool used for research in the humanities",
"type": "object",
"properties": {
"name": {
"description": "The unique 'speaking' id of the tool. Always lowercase and hyphenated and must match filename.",
"type": "string",
"pattern": "^[a-z]{1}[a-z-]+[a-z]{1}$"
},
"wikidata-id": {
"description": "Unique Wikidata identifier. Starts always with prefix Q",
"type": "string",
"pattern": "^Q[0-9]+"
},
"image": {
"description": "URLs of the logo in Wikimedia Commons",
"type": "object",
"properties": {
"svg": { "$ref": "#/$defs/image-data" },
"png": { "$ref": "#/$defs/image-data" },
"jpg": { "$ref": "#/$defs/image-data" }
},
"additionalProperties": false
},
"classification": {
"description": "Standard and internal vocabularies we used to classify our tools.",
"type": "object",
"properties": {
"smsp-categories": { "$ref": "#/$defs/smsp-category-data" },
"tadirah": { "$ref": "#/$defs/tadirah-data" }
},
"additionalProperties": false,
"if": {
"properties": {
"smsp-categories": {
"properties": {
"identifiers": {
"items": {
"const": "Q7397"
}
}
}
}
},
"required": [ "smsp-categories" ]
},
"then": { "required": [ "tadirah" ] }
},
"qr-code": {
"description": "QR code of the tool's URL",
"type": "object",
"properties": {
"svg": { "$ref": "#/$defs/qr-code-data" },
"png": { "$ref": "#/$defs/qr-code-data" },
"jpg": { "$ref": "#/$defs/qr-code-data" }
},
"additionalProperties": false
},
"set-up": {
"title": "Installation and set-up",
"description": "Installation and set-ups guides for the tool.",
"type": "object",
"$comment": "NOTICE: Incomplete, this subschema need to be declared yet!" }
},
"additionalProperties": false,
"required": [ "name", "wikidata-id", "classification" ],
"$defs": {
"image-data": {
"examples": [ "https://upload.wikimedia.org/wikipedia/commons/1/1a/Logo_TeXstudio.svg" ],
"type": "string",
"pattern": "^(https://upload\\.wikimedia\\.org/wikipedia/commons/).+\\.(svg|png|jpg|jpeg)$",
"format": "uri"
},
"qr-code-data": {
"examples": [ "https://raw.githubusercontent.com/FuReSH/tool-storage-data/main/assets/qr-code/tei-p5.svg" ],
"type": "string",
"pattern": "^(https://raw\\.githubusercontent\\.com/FuReSH/tool-storage-data/main/assets/qr-code/)[a-z]{1}[a-z1-9\\-]+\\.(svg|png|jpg|jpeg)$",
"format": "uri"
},
"smsp-category-data": {
"title": "Taxonomy of Scholarly Makerspace (smsp) toolboxes, used for internal classification.",
"description": "Expects Wikidata identifiers.",
"examples": [ "Q17737", "Q1799072", "Q7397", "Q3966" ],
"type": "object",
"properties": {
"api-base-url": {
"const": "https://www.wikidata.org/w/rest.php/wikibase/v0"
},
"identifiers": {
"type": "array",
"uniqueItems": true,
"items": {
"docHint": "enum",
"type": "string",
"anyOf": [
{"const": "Q17737", "description": "theory"},
{"const": "Q1799072", "description": "method"},
{"const": "Q7397", "description": "software"},
{"const": "Q3966", "description": "hardware"},
{"const": "Q9143", "description": "programming language"},
{"const": "Q235557", "description": "file format"},
{"const": "Q151885", "description": "concept"}
]
}
}
},
"additionalProperties": false,
"required": [ "identifiers" ]
},
"tadirah-data": {
"title": "Taxonomy of Digital Research Activities in the Humanities (tadirah).",
"description": "Expects unique TaDiRAH identifiers. See https://vocabs.dariah.eu/tadirah/en/ for a list of all available identifiers.",
"examples": [ "posTagging", "namedEntityRecognition"],
"type": "object",
"properties": {
"api-base-url": { "const": "https://vocabs.dariah.eu/tadirah/" },
"identifiers": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[a-z][a-zA-Z]+$"
}
}
},
"additionalProperties": false,
"required": [ "identifiers" ]
}
}
}