forked from simple-icons/simple-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jsonschema.json
263 lines (263 loc) · 8.13 KB
/
.jsonschema.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
{
"title": "Simple Icons",
"definitions": {
"brand": {
"$id": "#brand",
"description": "A single brand",
"type": "object",
"required": ["title", "hex", "source"],
"properties": {
"title": {
"$ref": "#/definitions/title"
},
"slug": {
"$ref": "#/definitions/slug"
},
"hex": {
"description": "The brand color",
"$ref": "#/definitions/hex"
},
"source": {
"description": "The website from which the icon was sourced",
"$ref": "#/definitions/sourceUrl"
},
"guidelines": {
"description": "The brand guidelines",
"$ref": "#/definitions/url"
},
"aliases": {
"description": "The aliases for the brand",
"type": "object",
"properties": {
"aka": {
"description": "The brand is also known as (e.g. full length name or abbreviation)",
"type": "array",
"items": { "type": "string" }
},
"dup": {
"description": "Different brands that use the exact same icon",
"type": "array",
"items": { "$ref": "#/definitions/duplicate" }
},
"loc": {
"description": "Localized names of the brand",
"$ref": "#/definitions/locale"
},
"old": {
"description": "Old names, for backwards compatibility",
"type": "array",
"items": { "type": "string" }
}
},
"minProperties": 1,
"additionalProperties": false
},
"license": {
"description": "The license for the icon",
"oneOf": [
{
"type": "object",
"required": ["type"],
"properties": {
"type": {
"description": "An SPDX License Identifier",
"type": "string",
"enum": [
"0BSD",
"AAL",
"AFL-1.1",
"AFL-1.2",
"AFL-2.0",
"AFL-3.0",
"Afmparse",
"AGPL-1.0-only",
"AGPL-1.0-or-later",
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"Aladdin",
"AML",
"AMPAS",
"Apache-1.0",
"Apache-1.1",
"Apache-2.0",
"APL-1.0",
"Artistic-1.0",
"Artistic-1.0-cl8",
"Artistic-1.0-Perl",
"Artistic-2.0",
"CC-BY-1.0",
"CC-BY-2.0",
"CC-BY-2.5",
"CC-BY-3.0",
"CC-BY-4.0",
"CC-BY-NC-1.0",
"CC-BY-NC-2.0",
"CC-BY-NC-2.5",
"CC-BY-NC-3.0",
"CC-BY-NC-4.0",
"CC-BY-NC-ND-1.0",
"CC-BY-NC-ND-2.0",
"CC-BY-NC-ND-2.5",
"CC-BY-NC-ND-3.0",
"CC-BY-NC-ND-4.0",
"CC-BY-NC-SA-1.0",
"CC-BY-NC-SA-2.0",
"CC-BY-NC-SA-2.5",
"CC-BY-NC-SA-3.0",
"CC-BY-NC-SA-4.0",
"CC-BY-ND-1.0",
"CC-BY-ND-2.0",
"CC-BY-ND-2.5",
"CC-BY-ND-3.0",
"CC-BY-ND-4.0",
"CC-BY-SA-1.0",
"CC-BY-SA-2.0",
"CC-BY-SA-2.5",
"CC-BY-SA-3.0",
"CC-BY-SA-4.0",
"CC-PDDC",
"CC0-1.0",
"CDDL-1.0",
"CDDL-1.1",
"ClArtistic",
"copyleft-next-0.3.0",
"copyleft-next-0.3.1",
"CPAL-1.0",
"CPL-1.0",
"CPOL-1.02",
"EUPL-1.0",
"EUPL-1.1",
"EUPL-1.2",
"GPL-1.0-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-2.0-or-later",
"GPL-3.0-only",
"GPL-3.0-or-later",
"LAL-1.2",
"LAL-1.3",
"MIT",
"NLPL",
"OPL-1.0",
"Unlicense",
"UPL-1.0",
"WTFPL"
]
},
"url": {
"description": "The URL to the license text by the brand",
"$ref": "#/definitions/url"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": ["type", "url"],
"properties": {
"type": {
"description": "The license name or 'custom'",
"type": "string",
"enum": ["custom"]
},
"url": {
"description": "The URL to the license text by the brand",
"$ref": "#/definitions/url"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
"duplicate": {
"$id": "#duplicate",
"description": "A \"dup\" brand",
"type": "object",
"required": ["title"],
"properties": {
"title": {
"$ref": "#/definitions/title"
},
"slug": {
"$ref": "#/definitions/slug"
},
"hex": {
"description": "The brand color, if different from the original",
"$ref": "#/definitions/hex"
},
"source": {
"description": "The website from which the duplicate's hex was sourced, if different from the original",
"$ref": "#/definitions/url"
},
"guidelines": {
"description": "The brand guidelines, if different from the original",
"$ref": "#/definitions/url"
}
},
"additionalProperties": false
},
"hex": {
"$id": "#hex",
"description": "A 6-character hexadecimal color value (without #)",
"type": "string",
"pattern": "^[0-9A-F]{6}$"
},
"locale": {
"$id": "#locale",
"description": "A localized brand name",
"type": "object",
"patternProperties": {
"^[a-z]{2}-[A-Z]{2}$": {
"type": "string",
"description": "The local name of the brand"
}
},
"minProperties": 1,
"additionalProperties": false
},
"slug": {
"$id": "#slug",
"description": "The brand name slug (used as filename in icons/)",
"type": "string",
"pattern": "^[a-z0-9]+(_[a-z0-9]+)?$"
},
"title": {
"$id": "#title",
"description": "The name of the brand",
"type": "string"
},
"sourceUrl": {
"$id": "#sourceUrl",
"description": "URL for icon source. If is a GitHub URL, is validated to contain a commit hash, to be an issue comment or to be a GitHub organization URL",
"type": "string",
"if": {
"pattern": "^https://github\\.com/(?!(features/actions)|(sponsors)|(logos)$)"
},
"then": {
"pattern": "^https://github\\.com/[^/]+/[^/]+/(blob/[a-f\\d]{40}/[^\\s]+)|(tree/[a-f\\d]{40}(/[^\\s]+)?)|(((issues)|(pull))/\\d+#issuecomment-\\d+)$"
},
"else": {
"$ref": "#/definitions/url"
}
},
"url": {
"$id": "#url",
"description": "HTTPS-only URL for a source",
"type": "string",
"pattern": "^https://[^\\s]+$"
}
},
"type": "object",
"properties": {
"icons": {
"description": "A list of brands",
"type": "array",
"items": { "$ref": "#/definitions/brand" }
}
},
"additionalProperties": false,
"required": ["icons"]
}