|
|
@@ -4,6 +4,44 @@
|
|
|
"names": {
|
|
|
"items": {"type": "string"},
|
|
|
"type": "array"
|
|
|
+ },
|
|
|
+ "Inspired": {
|
|
|
+ "patternProperties": {
|
|
|
+ "^[0-9]$": {
|
|
|
+ "properties": {
|
|
|
+ "spellsPerDayRemaining": false,
|
|
|
+ "spellsKnown": false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "Spontaneous": {
|
|
|
+ "patternProperties": {
|
|
|
+ "^[0-9]$": {
|
|
|
+ "properties": {
|
|
|
+ "spellsPrepared": false,
|
|
|
+ "spellsPreparedPreviously": false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "Researched": {
|
|
|
+ "patternProperties": {
|
|
|
+ "^[0-9]$": {
|
|
|
+ "properties": {
|
|
|
+ "spellsPerDayRemaining": false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "Retrieved": {
|
|
|
+ "patternProperties": {
|
|
|
+ "^[0-9]$": {
|
|
|
+ "properties": {
|
|
|
+ "spellsKnown": false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
"properties": {
|
|
|
@@ -20,17 +58,15 @@
|
|
|
"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"
|
|
|
- }
|
|
|
+ "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"
|
|
|
}
|
|
|
@@ -38,73 +74,27 @@
|
|
|
"oneOf": [
|
|
|
{
|
|
|
"properties": {
|
|
|
- "@class": {
|
|
|
- "const": "org.leumasjaffe.charsheet.model.magic.impl.Inspired"
|
|
|
- },
|
|
|
- "spellInfo": {
|
|
|
- "^[0-9]$": {
|
|
|
- "required": [
|
|
|
- "spellsPerDay",
|
|
|
- "spellsPrepared",
|
|
|
- "spellsPreparedPreviously"
|
|
|
- ],
|
|
|
- "additionalProperties":false
|
|
|
- }
|
|
|
- }
|
|
|
+ "@class": {"const": "org.leumasjaffe.charsheet.model.magic.impl.Inspired"},
|
|
|
+ "spellInfo": {"$ref": "#/definitions/Inspired"}
|
|
|
},
|
|
|
"required": ["classRef"]
|
|
|
},
|
|
|
{
|
|
|
"properties": {
|
|
|
- "@class": {
|
|
|
- "const": "org.leumasjaffe.charsheet.model.magic.impl.Spontaneous"
|
|
|
- },
|
|
|
- "spellInfo": {
|
|
|
- "^[0-9]$": {
|
|
|
- "required": [
|
|
|
- "spellsPerDay",
|
|
|
- "spellsPerDayRemaining",
|
|
|
- "spellsKnown"
|
|
|
- ],
|
|
|
- "additionalProperties":false
|
|
|
- }
|
|
|
- }
|
|
|
+ "@class": {"const": "org.leumasjaffe.charsheet.model.magic.impl.Spontaneous"},
|
|
|
+ "spellInfo": {"$ref": "#/definitions/Spontaneous"}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
"properties": {
|
|
|
- "@class": {
|
|
|
- "const": "org.leumasjaffe.charsheet.model.magic.impl.Researched"
|
|
|
- },
|
|
|
- "spellInfo": {
|
|
|
- "^[0-9]$": {
|
|
|
- "required": [
|
|
|
- "spellsPerDay",
|
|
|
- "spellsKnown",
|
|
|
- "spellsPrepared",
|
|
|
- "spellsPreparedPreviously"
|
|
|
- ],
|
|
|
- "additionalProperties":false
|
|
|
- }
|
|
|
- }
|
|
|
+ "@class": {"const": "org.leumasjaffe.charsheet.model.magic.impl.Researched"},
|
|
|
+ "spellInfo": {"$ref": "#/definitions/Researched"}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
"properties": {
|
|
|
- "@class": {
|
|
|
- "const": "org.leumasjaffe.charsheet.model.magic.impl.Retrieved"
|
|
|
- },
|
|
|
- "spellInfo": {
|
|
|
- "^[0-9]$": {
|
|
|
- "required": [
|
|
|
- "spellsPerDay",
|
|
|
- "spellsPerDayRemaining",
|
|
|
- "spellsPrepared",
|
|
|
- "spellsPreparedPreviously"
|
|
|
- ],
|
|
|
- "additionalProperties":false
|
|
|
- }
|
|
|
- }
|
|
|
+ "@class": {"const": "org.leumasjaffe.charsheet.model.magic.impl.Retrieved"},
|
|
|
+ "spellInfo": {"$ref": "#/definitions/Retrieved"}
|
|
|
},
|
|
|
"required": ["classRef"]
|
|
|
}
|
|
|
@@ -113,5 +103,6 @@
|
|
|
"@class",
|
|
|
"spellInfo"
|
|
|
],
|
|
|
- "type": "object"
|
|
|
+ "type": "object",
|
|
|
+ "additionalProperties": false
|
|
|
}
|