| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- {
- "$schema": "http://json-schema.org/draft-06/schema#",
- "properties": {
- "@class": {"type": "string"},
- "classRef": {"type": "string"},
- "spellInfo": {
- "dependencies":{
- "2":["1"],
- "3":["2"],
- "4":["3"],
- "5":["4"],
- "6":["5"],
- "7":["6"],
- "8":["7"],
- "9":["8"]
- },
- "propertyNames": {
- "enum": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
- },
- "additionalProperties": {
- "spellsPerDay": {"type": "integer"},
- "spellsPerDayRemaining": {"type": "integer"},
- "spellsKnown": {"$ref": "#/definitions/names"},
- "spellsPrepared": {"$ref": "#/definitions/names"},
- "spellsPreparedPreviously": {"$ref": "#/definitions/names"}
- },
- "type": "object"
- }
- },
- "oneOf": [
- {
- "properties": {
- "@class": {"const": "org.leumasjaffe.charsheet.model.magic.impl.Inspired"},
- "spellInfo": {"$ref": "#/definitions/castingType/Inspired"}
- },
- "required": ["classRef"]
- },
- {
- "properties": {
- "@class": {"const": "org.leumasjaffe.charsheet.model.magic.impl.Spontaneous"},
- "spellInfo": {"$ref": "#/definitions/castingType/Spontaneous"}
- }
- },
- {
- "properties": {
- "@class": {"const": "org.leumasjaffe.charsheet.model.magic.impl.Researched"},
- "spellInfo": {"$ref": "#/definitions/castingType/Researched"}
- }
- },
- {
- "properties": {
- "@class": {"const": "org.leumasjaffe.charsheet.model.magic.impl.Retrieved"},
- "spellInfo": {"$ref": "#/definitions/castingType/Retrieved"}
- },
- "required": ["classRef"]
- }
- ],
- "required": [
- "@class",
- "spellInfo"
- ],
- "type": "object",
- "additionalProperties": false,
- "definitions": {
- "names": {
- "items": {"type": "string"},
- "type": "array"
- },
- "castingType": {
- "Inspired": {
- "additionalProperties": {
- "required": ["spellsPerDay", "spellsPrepared", "spellsPreparedPreviously"],
- "properties": {
- "spellsPerDayRemaining": false,
- "spellsKnown": false
- }
- }
- },
- "Spontaneous": {
- "additionalProperties": {
- "required": ["spellsPerDay", "spellsPerDayRemaining", "spellsKnown"],
- "properties": {
- "spellsPrepared": false,
- "spellsPreparedPreviously": false
- }
- }
- },
- "Researched": {
- "additionalProperties": {
- "required": ["spellsPerDay", "spellsKnown", "spellsPrepared", "spellsPreparedPreviously"],
- "properties": {
- "spellsPerDayRemaining": false
- }
- }
- },
- "Retrieved": {
- "additionalProperties": {
- "required": ["spellsPerDay", "spellsPerDayRemaining", "spellsPrepared", "spellsPreparedPreviously"],
- "properties": {
- "spellsKnown": false
- }
- }
- }
- }
- }
- }
|