Files
Dreierpack-Manager/docs/formats/obw/schema/1.0/competitions.json
T

172 lines
4.8 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/Weyoune/openbmh/main/docs/formats/obw/schema/1.0/competitions.json",
"type": "object",
"properties": {
"schema": {
"const": "competitions@1.0"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^comp:[a-zA-Z0-9._-]+$"
},
"name": {
"$ref": "common.json#/$defs/localized"
},
"type": {
"enum": [
"league",
"cup",
"club_international",
"national_team",
"friendly",
"indoor"
]
},
"nation": {
"$ref": "common.json#/$defs/nation_id"
},
"tier": {
"type": "integer",
"minimum": 1
},
"played": {
"type": "boolean"
},
"stages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"format": {
"enum": [
"league",
"groups",
"knockout",
"final",
"playoff"
]
},
"teams": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"legs": {
"type": "integer",
"minimum": 1
},
"generator": {
"type": "string"
},
"matchdays": {
"type": "string"
},
"slots": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"teams": {
"type": "array",
"items": {
"$ref": "common.json#/$defs/team_id"
},
"uniqueItems": true
}
},
"required": [
"teams"
]
},
{
"type": "object",
"properties": {
"resolver": {
"const": "classic-entry@1"
},
"entry": {
"type": "integer",
"minimum": 0,
"maximum": 35
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 255
}
},
"required": [
"resolver",
"entry",
"count"
]
}
]
},
"minItems": 1
}
},
"required": [
"id",
"format",
"teams",
"legs",
"slots"
],
"additionalProperties": true
},
"minItems": 1
},
"trophy": {
"type": "string",
"pattern": "^asset:comp/(?!\\.{1,2}/)[a-zA-Z0-9._-]+/trophy$",
"description": "Optional presentation key; default is asset:comp/<competition key>/trophy. Missing artwork resolves to asset:comp/generic/trophy and then a built-in neutral trophy icon."
}
},
"required": [
"id",
"name",
"type",
"played",
"stages"
],
"additionalProperties": true,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "league"
}
}
},
"then": {
"required": [
"nation",
"tier"
]
}
}
]
}
}
},
"required": [
"schema",
"items"
],
"additionalProperties": true,
"$comment": "SPDX-License-Identifier: GPL-3.0-only; legacy database and Classic installation profiles."
}