From 78b4cde56de23fcc685f86f2899f17135489c7e2 Mon Sep 17 00:00:00 2001 From: Greg Dennis Date: Fri, 1 Jul 2022 20:55:30 +1200 Subject: [PATCH] fix URIs and remove location props from root node on basic --- jsonschema-core.xml | 61 +++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index e2539bb1..14d4fa9c 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -3036,7 +3036,9 @@ https://example.com/schemas/common#/$defs/count/minimum The root output unit contains "valid" for the overall result and "nested" for the list of specific results. All other information is explicitly - omitted from the root output unit. + omitted from the root output unit. If the root schema produces errors or + annotations, then the output node for the root MUST be present within the + root output unit's "nested" list with those errors or annotations. Output units which do not contain errors or annotations SHOULD be excluded @@ -3049,14 +3051,11 @@ https://example.com/schemas/common#/$defs/count/minimum // failing results { "valid": false, - "evaluationPath": "", - "schemaLocation": "https://json-schema.org/schemas/example#", - "instanceLocation": "", "nested": [ { "valid": false, - "evaluationPath": "/properties/foo/0", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/0", + "evaluationPath": "/properties/foo/allOf/0", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/0", "instanceLocation": "/foo", "errors": { "required": "Required properties [\"unspecified-prop\"] were not present" @@ -3064,8 +3063,8 @@ https://example.com/schemas/common#/$defs/count/minimum }, { "valid": false, - "evaluationPath": "/properties/foo/1/properties/foo-prop", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1/properties/foo-prop", + "evaluationPath": "/properties/foo/allOf/1/properties/foo-prop", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/1/properties/foo-prop", "instanceLocation": "/foo/foo-prop", "errors": { "const": "Expected \"1\"" @@ -3086,9 +3085,6 @@ https://example.com/schemas/common#/$defs/count/minimum // passing results { "valid": true, - "evaluationPath": "", - "schemaLocation": "https://json-schema.org/schemas/example#", - "instanceLocation": "", "nested": [ { "valid": true, @@ -3105,8 +3101,8 @@ https://example.com/schemas/common#/$defs/count/minimum }, { "valid": true, - "evaluationPath": "/properties/foo/1", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1", + "evaluationPath": "/properties/foo/allOf/1", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/1", "instanceLocation": "/foo", "annotations": { "title": "foo-title", @@ -3132,8 +3128,8 @@ https://example.com/schemas/common#/$defs/count/minimum }, { "valid": true, - "evaluationPath": "/properties/foo/1/properties/foo-prop", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1/properties/foo-prop", + "evaluationPath": "/properties/foo/allOf/1/properties/foo-prop", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/1/properties/foo-prop", "instanceLocation": "/foo/foo-prop", "annotations": { "title": "foo-prop-title" @@ -3166,8 +3162,7 @@ https://example.com/schemas/common#/$defs/count/minimum All output units are included in this format. - The location properties of the output unit MAY be omitted from the - root node. + The location properties of the root output unit MAY be omitted.
@@ -3187,8 +3182,8 @@ https://example.com/schemas/common#/$defs/count/minimum "nested": [ { "valid": false, - "evaluationPath": "/properties/foo/0", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/0", + "evaluationPath": "/properties/foo/allOf/0", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/0", "instanceLocation": "/foo", "errors": { "required": "Required properties [\"unspecified-prop\"] were not present" @@ -3196,14 +3191,14 @@ https://example.com/schemas/common#/$defs/count/minimum }, { "valid": false, - "evaluationPath": "/properties/foo/1", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1", + "evaluationPath": "/properties/foo/allOf/1", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/1", "instanceLocation": "/foo", "nested": [ { "valid": false, - "evaluationPath": "/properties/foo/1/properties/foo-prop", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1/properties/foo-prop", + "evaluationPath": "/properties/foo/allOf/1/properties/foo-prop", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/1/properties/foo-prop", "instanceLocation": "/foo/foo-prop", "errors": { "const": "Expected \"1\"" @@ -3211,8 +3206,8 @@ https://example.com/schemas/common#/$defs/count/minimum }, { "valid": true, - "evaluationPath": "/properties/foo/1/additionalProperties/other-prop", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1/additionalProperties/other-prop", + "evaluationPath": "/properties/foo/allOf/1/additionalProperties", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/1/additionalProperties", "instanceLocation": "/foo/other-prop" } ] @@ -3269,14 +3264,14 @@ https://example.com/schemas/common#/$defs/count/minimum "nested": [ { "valid": true, - "evaluationPath": "/properties/foo/0", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/0", + "evaluationPath": "/properties/foo/allOf/0", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/0", "instanceLocation": "/foo" }, { "valid": true, - "evaluationPath": "/properties/foo/1", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1", + "evaluationPath": "/properties/foo/allOf/1", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/1", "instanceLocation": "/foo", "annotations": { "title": "foo-title", @@ -3290,8 +3285,8 @@ https://example.com/schemas/common#/$defs/count/minimum "nested": [ { "valid": true, - "evaluationPath": "/properties/foo/1/properties/foo-prop", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1/properties/foo-prop", + "evaluationPath": "/properties/foo/allOf/1/properties/foo-prop", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/1/properties/foo-prop", "instanceLocation": "/foo/foo-prop", "annotations": { "title": "foo-prop-title" @@ -3299,8 +3294,8 @@ https://example.com/schemas/common#/$defs/count/minimum }, { "valid": true, - "evaluationPath": "/properties/foo/1/additionalProperties/unspecified-prop", - "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1/additionalProperties/unspecified-prop", + "evaluationPath": "/properties/foo/allOf/1/additionalProperties", + "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/allOf/1/additionalProperties", "instanceLocation": "/foo/unspecified-prop" } ]