Remove anyOf, because technically it requires matching all subschemas - just redeclare the stats values...

This commit is contained in:
Yair Morgenstern
2023-09-21 23:34:24 +03:00
parent 5dbdf630ab
commit cb27d13723

View File

@ -2,19 +2,21 @@
"$schema": "http://json-schema.org/draft-07/schema",
"type": "array",
"items": {
"allOf": [
{ "$ref": "#/definitions/stats"},
{
"type": "object",
"properties": {
"name": { "type": "string" },
"production": { "type": "number" },
"food": { "type": "number" },
"gold": { "type": "number" },
"science": { "type": "number" },
"culture": { "type": "number" },
"happiness": { "type": "number" },
"faith": { "type": "number" },
"uniques": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[^><]*(\\<[^>]*\\>[^><]*)*$"
},
"uniqueItems": true // Can't imagine you mean to include the same thing twice
"items": { "type": "string" }
},
"civilopediaText": {
"type": "array",
@ -46,8 +48,6 @@
"name"
],
"additionalProperties": false
}
]
},
"definitions": {
"stats": {