Initial commit

This commit is contained in:
Deukhoofd 2020-12-13 16:56:59 +01:00
commit 5e09c719d2
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 258 additions and 0 deletions

258
pokemonSchema.json Normal file
View File

@ -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"
}
}
}
}
}
}
}
}