simple-icons/.jsonschema.json
2021-05-27 19:29:34 +02:00

248 lines
7.4 KiB
JSON

{
"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/url"
},
"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", "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
},
{
"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
}
]
}
},
"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"
},
"url": {
"$id": "#url",
"type": "string",
"pattern": "^https?://[^\\s]+$"
}
},
"type": "object",
"properties": {
"icons": {
"description": "A list of brands",
"type": "array",
"items": { "$ref": "#/definitions/brand" }
}
}
}