- Added models to the API data

This commit is contained in:
Alexis
2020-05-16 14:57:17 +02:00
parent c297ed24eb
commit 4571dd93f3
2 changed files with 51 additions and 0 deletions

39
models/Spell.js Normal file
View File

@@ -0,0 +1,39 @@
const Spell = {
"id": "/SpellModel",
"type": Object,
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"level": { "type": "number" },
"charge": { "type": "number" },
"cost": { "type": "string" },
"is_ritual": { "type": "boolean" },
"schools": {
"type": { "type": "array" },
"items": {
"properties": {
"id": { "type": "number" },
}
}
},
"variables": {
"type": { "type": "array" },
"items": {
"properties": {
"id": { "type": "number" },
}
}
},
"ingredients": {
"type": { "type": "array" },
"items": {
"properties": {
"id": { "type": "number" },
}
}
}
},
"required": ["name", "description"]
}
module.exports = Spell