Last active
August 28, 2023 10:10
-
-
Save zloader/16bd780228ba310c4af358c488fb496f to your computer and use it in GitHub Desktop.
The MPQ game card JSON scheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"description": "The MPQ game card", | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"minLength": 32, | |
"maxLength": 36 | |
}, | |
"title": { | |
"type": "object", | |
"properties": { | |
"main": { | |
"type": "string", | |
"minLength": 1, | |
"maxLength": 64, | |
"description": "Main character's name" | |
}, | |
"second": { | |
"type": "string", | |
"minLength": 1, | |
"maxLength": 64, | |
"description": "Altrnative character name", | |
} | |
}, | |
"required": [ | |
"main", | |
"second" | |
] | |
}, | |
"description": { | |
"type": "string", | |
"minLength": 1, | |
"maxLength": 255, | |
"description": "Character' story." | |
}, | |
"image": { | |
"type": "string", | |
"format": "uri", | |
"description": "Character' image URL" | |
}, | |
"rarity": { | |
"type": "integer", | |
"minimum": 1, | |
"maximum": 5, | |
"description": "Character' rarity" | |
}, | |
"cover": { | |
"type": "object", | |
"properties": { | |
"image": { | |
"type": "string", | |
"format": "uri", | |
"description": "Book cover image URL" | |
}, | |
"artist": { | |
"type": "string", | |
"minimum": 1, | |
"maximum": 64, | |
"description": "Book author" | |
} | |
}, | |
"required": [ | |
"image", | |
"artist" | |
] | |
}, | |
"powers": { | |
"type": "array", | |
"minItems": 2, | |
"maxItems": 3, | |
"uniqueItems": true, | |
"items": [ | |
{ | |
"type": "object", | |
"properties": { | |
"title": { | |
"type": "string", | |
"minimum": 1, | |
"maximum": 32, | |
"description": "Character' power name." | |
}, | |
"description": { | |
"type": "string", | |
"minimum": 1, | |
"maximum": 255, | |
"description": "Power' short description." | |
}, | |
"color": { | |
"type": "string", | |
"enum": ["yellow", "red", "blue", "green", "purple", "black"], | |
"description": "Power ID." | |
} | |
}, | |
"required": [ | |
"title", | |
"description", | |
"color" | |
] | |
} | |
] | |
} | |
}, | |
"required": [ | |
"id", | |
"title", | |
"description", | |
"image", | |
"rarity", | |
"cover", | |
"powers" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment