1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-11-16 00:59:07 +02:00
simple-icons/.jsonschema.json
2024-10-01 04:34:00 +08:00

173 lines
5.0 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/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"]
}