spotify-genres/schema/genre_metadata.json

126 lines
3.3 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "genre_metadata",
"title": "Spotify genre metadata",
"type": "object",
"propertyNames": {
"description": "Genre ID",
"type": "string",
"pattern": "^[a-z0-9\\-+: '&]+$"
},
"additionalProperties": {
"description": "Spotify genre",
"type": "object",
"properties": {
"name": {
"description": "Spotify genre name",
"type": "string"
},
"description": {
"description": "Genre description text",
"type": "string"
},
"parent": {
"description": "ID of the parent genre if this is a subgenre",
"type": "string",
"pattern": "^[a-z0-9\\-+: '&]+$"
},
"language": {
"description": "ISO-639-3 language code if the genre implies lyrics in a specific language",
"type": ["string", "null"],
"pattern": "^[a-z]{3}$"
},
"country": {
"description": "ISO-3166-1 country code if the genre is dominant in a specific country",
"type": ["string", "null"],
"pattern": "^[A-Z]{2}$"
},
"region": {
"description": "Region code if the genre is dominant in a specific region\nRegion codes are not standardized, refer to the documentation for a definition.",
"type": "string",
"enum": [
"AF",
"BK",
"BT",
"CA",
"CE",
"CB",
"CC",
"CG",
"CK",
"CS",
"DH",
"DS",
"EE",
"EU",
"HW",
"LA",
"ME",
"ND",
"NF",
"OZ",
"SA",
"SE",
"SC",
"WF"
]
},
"localized_name": {
"description": "True if the name has to be localized",
"type": "boolean"
},
"wikipedia_url": {
"description": "English Wikipedia URL for more information about the genre",
"type": "string"
},
"wikidata_id": {
"description": "Wikidata entity ID of the genre",
"type": "integer"
},
"rank": {
"description": "Position in the popularity ranking (1: most popular)",
"type": "number",
"minimum": 1
},
"playlists": {
"description": "Spotify playlist IDs",
"propertyNames": {
"description": "Playlist kind",
"type": "string",
"enum": [
"sound",
"intro",
"pulse",
"edge",
"2018",
"2019",
"2020",
"2021",
"2022",
"2023"
]
},
"additionalProperties": {
"description": "Spotify playlist ID",
"type": "string",
"pattern": "^[A-z0-9]{22}$"
}
},
"alias": {
"description": "Genre ID this genre is an alias of",
"type": "string",
"pattern": "^[a-z0-9\\-+: '&]+$"
},
"deprecated": {
"description": "True if the genre is no longer part of Spotify's catalog",
"type": "boolean"
},
"metagenre": {
"description": "True if the genre is a metagenre\nMetagenres do not exist at Spotify but are used to group other genres together.",
"type": "boolean"
}
},
"required": ["name"],
"additionalProperties": false
}
}