we have a weird problem. While using this schema (we had to rename stuff because it's not public):
{
"$schema": "http://json-schema.org/draft-04/schema#",
"name": "xxx",
"anyOf": [
{
"additionalProperties": false,
"type": "object",
"properties": {
"def1": {"$ref": "#/definitions/def1"},
"def3": {"$ref": "#/definitions/def3"}
},
"required": [
"def1",
"def3"
]
},
{
"minItems": 2,
"maxItems": 2,
"type": "array",
"items": [
{"$ref": "#/definitions/def3"},
{"$ref": "#/definitions/def1"}
]
}
],
"definitions": {
"def2": {
"additionalProperties": false,
"type": "object",
"title": "plattform:def2",
"properties": {
"Vorname": {"$ref": "#/definitions/def4"},
"Name": {"$ref": "#/definitions/def4"}
}
},
"def4": {
"minLength": 1,
"description": "Suchbegriff mit * als Wildcard",
"type": "string",
"title": "plattform:def4",
"maxLength": 255
},
"def3": {
"additionalProperties": false,
"type": "object",
"title": "plattform:def3",
"properties": {"def2": {"$ref": "#/definitions/def2"}}
},
"def1": {
"additionalProperties": false,
"type": "object",
"title": "plattform:def1",
"properties": {
"AnzahlProSeite": {
"maximum": 100,
"type": "integer",
"title": "",
"minimum": 1
},
"Seite": {
"type": "integer",
"title": "",
"minimum": 1
}
},
"required": [
"Seite",
"AnzahlProSeite"
]
}
}
}
There aren't any files generated from this. All validators for json schema show this as valid.
We then rewrote the schema and removed the anyOf and replaced it with the object we will be using and then it worked. Not really a good option because we don't want to do stuff manually for a process which we desire to be automatic.