1{ 2 "$schema": "http://json-schema.org/draft-07/schema#", 3 "type": "object", 4 "properties": { 5 "V": { 6 "type": "array", 7 "items": { 8 "oneOf": [ 9 { 10 "type": "object", 11 "properties": { 12 "X": { 13 "type": "string" 14 } 15 }, 16 "required": [ 17 "X" 18 ], 19 "additionalProperties": false 20 }, 21 { 22 "type": "object", 23 "properties": { 24 "A": { 25 "type": "string" 26 }, 27 "B": { 28 "type": "string" 29 }, 30 "C": { 31 "type": "string" 32 } 33 }, 34 "anyOf": [ 35 { 36 "properties": { 37 "origin": { 38 "const": "not-present" 39 } 40 }, 41 "required": [ 42 "A", 43 "C" 44 ] 45 }, 46 { 47 "properties": { 48 "origin": { 49 "const": "not-present-either" 50 } 51 }, 52 "required": [ 53 "A", 54 "B" 55 ] 56 } 57 ], 58 "additionalProperties": false, 59 "required": [ 60 "A" 61 ], 62 "not": { 63 "type": "object", 64 "required": [ 65 "X" 66 ] 67 } 68 } 69 ] 70 } 71 } 72 } 73}