| 1 | [ |
| 2 | { |
| 3 | "description": "multiple properties report independent errors", |
| 4 | "schema": { |
| 5 | "$schema": "https://json-schema.org/v1", |
| 6 | "$id": "https://json-schema.org/tests/content/v1-extra/properties/0", |
| 7 | "type": "object", |
| 8 | "properties": { |
| 9 | "str": {"type": "string"}, |
| 10 | "num": {"type": "number"} |
| 11 | }, |
| 12 | "required": ["str", "num"] |
| 13 | }, |
| 14 | "tests": [ |
| 15 | { |
| 16 | "description": "both properties produce errors", |
| 17 | "data": {"str": 1, "num": "boom"}, |
| 18 | "output": { |
| 19 | "list": { |
| 20 | "$id": "https://json-schema.org/tests/content/v1-extra/properties/0/tests/0/list", |
| 21 | "$ref": "/v1/output/schema", |
| 22 | "properties": { |
| 23 | "details": { |
| 24 | "allOf": [ |
| 25 | { |
| 26 | "contains": { |
| 27 | "properties": { |
| 28 | "schemaLocation": {"const": "https://json-schema.org/tests/content/v1-extra/properties/0#/properties/str/type"}, |
| 29 | "instanceLocation": {"const": "/str"} |
| 30 | }, |
| 31 | "required": ["schemaLocation", "instanceLocation"] |
| 32 | } |
| 33 | }, |
| 34 | { |
| 35 | "contains": { |
| 36 | "properties": { |
| 37 | "schemaLocation": {"const": "https://json-schema.org/tests/content/v1-extra/properties/0#/properties/num/type"}, |
| 38 | "instanceLocation": {"const": "/num"} |
| 39 | }, |
| 40 | "required": ["schemaLocation", "instanceLocation"] |
| 41 | } |
| 42 | } |
| 43 | ] |
| 44 | } |
| 45 | }, |
| 46 | "required": ["details"] |
| 47 | }, |
| 48 | "flag": { |
| 49 | "$id": "https://json-schema.org/tests/content/v1-extra/properties/0/tests/0/flag", |
| 50 | "$ref": "/v1/output/schema", |
| 51 | "properties": { |
| 52 | "valid": {"const": false} |
| 53 | }, |
| 54 | "required": ["valid"] |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | ] |
| 59 | } |
| 60 | ] |