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", "$schema": "http://json-schema.org/draft-07/schema",
"type": "array", "type": "array",
"items": { "items": {
"allOf": [
{ "$ref": "#/definitions/stats"},
{
"type": "object", "type": "object",
"properties": { "properties": {
"name": { "type": "string" }, "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": { "uniques": {
"type": "array", "type": "array",
"items": { "items": { "type": "string" }
"type": "string",
"pattern": "^[^><]*(\\<[^>]*\\>[^><]*)*$"
},
"uniqueItems": true // Can't imagine you mean to include the same thing twice
}, },
"civilopediaText": { "civilopediaText": {
"type": "array", "type": "array",
@ -46,8 +48,6 @@
"name" "name"
], ],
"additionalProperties": false "additionalProperties": false
}
]
}, },
"definitions": { "definitions": {
"stats": { "stats": {