commit 5e09c719d2566c96ad76c8b44343877019fa125b Author: Deukhoofd Date: Sun Dec 13 16:56:59 2020 +0100 Initial commit diff --git a/pokemonSchema.json b/pokemonSchema.json new file mode 100644 index 0000000..f85a2fd --- /dev/null +++ b/pokemonSchema.json @@ -0,0 +1,258 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Pokemon", + "description": "A schema for pokemon species data.", + "type": "object", + "properties": { + "$schema": { + "type": "string" + } + }, + "patternProperties": { + "^.*$": { + "type": "object", + "additionalProperties": false, + "required": [ + "species", + "id", + "genderRatio", + "growthRate", + "baseHappiness", + "catchRate", + "color", + "genderDifference", + "eggGroups", + "eggCycles", + "tags", + "formes", + "evolutions" + ], + "properties": { + "species": { "type": "string" }, + "id": { "type": "number" }, + "genderRatio": { + "type": "number", + "minimum": -1, + "maximum": 100 + }, + "growthRate": { + "type": "string", + "enum": [ + "Erratic", + "Fast", + "MediumFast", + "MediumSlow", + "Slow", + "Fluctuating" + ] + }, + "baseHappiness": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "catchRate": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "color": { + "type": "string" + }, + "genderDifference": { + "type": "boolean" + }, + "eggGroups": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "monster", + "water1", + "bug", + "flying", + "field", + "fairy", + "grass", + "humanlike", + "water3", + "mineral", + "amorphous", + "water2", + "ditto", + "dragon", + "undiscovered" + ] + } + }, + "eggCycles": { + "type": "integer", + "minimum": 0 + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "formes": { + "required": ["default"], + "patternProperties": { + "^.*$": { + "additionalProperties": false, + "type": "object", + "required": [ + "abilities", + "hiddenAbilities", + "baseStats", + "evReward", + "types", + "height", + "weight", + "baseExp", + "moves" + ], + "properties": { + "abilities": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "hiddenAbilities": { + "type": "array", + "minItems": 0, + "items": { + "type": "string" + } + }, + "baseStats": { + "required": [ + "hp", + "attack", + "defense", + "specialAttack", + "specialDefense", + "speed" + ], + "hp": { + "type": "integer", + "minimum": 0 + }, + "attack": { + "type": "integer", + "minimum": 0 + }, + "defense": { + "type": "integer", + "minimum": 0 + }, + "specialAttack": { + "type": "integer", + "minimum": 0 + }, + "specialDefense": { + "type": "integer", + "minimum": 0 + }, + "speed": { + "type": "integer", + "minimum": 0 + } + }, + "evReward": { + "hp": { + "type": "integer", + "minimum": 0 + }, + "attack": { + "type": "integer", + "minimum": 0 + }, + "defense": { + "type": "integer", + "minimum": 0 + }, + "specialAttack": { + "type": "integer", + "minimum": 0 + }, + "specialDefense": { + "type": "integer", + "minimum": 0 + }, + "speed": { + "type": "integer", + "minimum": 0 + } + }, + "types": { + "type": "array", + "minLength": 1, + "items": { + "type": "string", + "enum": [ + "normal", + "fighting", + "flying", + "poison", + "ground", + "rock", + "bug", + "ghost", + "steel", + "fire", + "water", + "grass", + "electric", + "psychic", + "ice", + "dragon", + "dark", + "fairy", + "divine" + ] + } + }, + "height": { + "type": "number", + "minimum": 0.1 + }, + "weight": { + "type": "number", + "minimum": 0.1 + }, + "baseExp": { + "type": "integer", + "minimum": 0 + }, + "isMega": { + "type": "boolean" + }, + "moves": {} + } + } + } + }, + "evolutions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "species": { + "type": "string" + }, + "method": { + "type": "string" + }, + "data": { + "type": "string" + } + } + } + } + } + } + } +}