| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "definitions": {
- "names": {
- "items": {"type": "string"},
- "type": "array"
- }
- },
- "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"]
- },
- "patternProperties": {
- "^[0-9]$": {
- "properties": {
- "spellsPerDay": {"type": "integer"},
- "spellsPerDayRemaining": {"type": "integer"},
- "spellsKnown": {"$ref": "#/definitions/names"},
- "spellsPrepared": {"$ref": "#/definitions/names"},
- "spellsPreparedPreviously": {"$ref": "#/definitions/names"}
- },
- "type": "object"
- }
- },
- "type": "object"
- }
- },
- "oneOf": [
- {
- "properties": {
- "@class": {
- "enum": [
- "org.leumasjaffe.charsheet.model.magic.impl.Inspired"
- ]
- },
- "spellInfo": {
- "^[0-9]$": {
- "required": [
- "spellsPerDay",
- "spellsPrepared",
- "spellsPreparedPreviously"
- ],
- "additionalProperties":false
- }
- }
- },
- "required": ["classRef"]
- },
- {
- "properties": {
- "@class": {
- "enum": [
- "org.leumasjaffe.charsheet.model.magic.impl.Spontaneous"
- ]
- },
- "spellInfo": {
- "^[0-9]$": {
- "required": [
- "spellsPerDay",
- "spellsPerDayRemaining",
- "spellsKnown"
- ],
- "additionalProperties":false
- }
- }
- }
- },
- {
- "properties": {
- "@class": {
- "enum": [
- "org.leumasjaffe.charsheet.model.magic.impl.Researched"
- ]
- },
- "spellInfo": {
- "^[0-9]$": {
- "required": [
- "spellsPerDay",
- "spellsKnown",
- "spellsPrepared",
- "spellsPreparedPreviously"
- ],
- "additionalProperties":false
- }
- }
- }
- },
- {
- "properties": {
- "@class": {
- "enum": [
- "org.leumasjaffe.charsheet.model.magic.impl.Retrieved"
- ]
- },
- "spellInfo": {
- "^[0-9]$": {
- "required": [
- "spellsPerDay",
- "spellsPerDayRemaining",
- "spellsPrepared",
- "spellsPreparedPreviously"
- ],
- "additionalProperties":false
- }
- }
- },
- "required": ["classRef"]
- }
- ],
- "required": [
- "@class",
- "spellInfo"
- ],
- "type": "object"
- }
|