forked from simple-icons/simple-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jsonschema.json
172 lines (172 loc) · 4.99 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
{
"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"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": ["type", "url"],
"properties": {
"type": {
"description": "Custom license type",
"const": "custom"
},
"url": {
"description": "The URL to the license text by the brand",
"$ref": "#/definitions/url"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
"duplicate": {
"$id": "#duplicate",
"description": "A brand that uses the same icon",
"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"
},
"loc": {
"description": "Localized names of the brand",
"$ref": "#/definitions/locale"
}
},
"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",
"$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"]
}