From 92569982678cf170eeabadaaa96bb6a8ef99ac6c Mon Sep 17 00:00:00 2001 From: Greg Dennis Date: Tue, 22 Nov 2022 09:17:09 +1300 Subject: [PATCH 1/2] update output's 'nested' to 'details' --- jsonschema-core.xml | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index a8ca268f..8a9f2c10 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -2974,10 +2974,10 @@ https://example.com/schemas/common#/$defs/allOf/1 -
+
- Nested results are generated from keywords which create a new dynamic - scope by applying a subschema to the instance or a child of the instance. + Evaluation results generated by applying a subschema to the instance + or a child of the instance. Keywords which have multiple subschemas (e.g. "anyOf") will generally generate an output unit for each subschema. In order to accommodate potentially multiple results, the value of this property MUST be an @@ -2988,8 +2988,8 @@ https://example.com/schemas/common#/$defs/allOf/1 and will hold all output units in a flat list. - For "hierarchical", this property will hold nested results in a tree - structure where each output unit may itself have nested results. + For "hierarchical", this property will contain results in a tree + structure where each output unit may itself have further nested results. The sequence of output units within this list is not specified and @@ -2997,7 +2997,7 @@ https://example.com/schemas/common#/$defs/allOf/1 considered equivalent if they contain the same units, in any order. - The JSON key for nested results is "nested". + The JSON key for these additional results is "details".
@@ -3007,13 +3007,13 @@ https://example.com/schemas/common#/$defs/allOf/1 The output MUST be an object containing a boolean property named "valid". When additional information about the result is required, the output MUST also contain - "nested" as described below. + "details" as described below. "valid" - a boolean value indicating the overall validation success or failure - "nested" - the collection of results produced by subschemas + "details" - the collection of results produced by subschemas For these examples, the following schema and instances will be used. @@ -3207,11 +3207,11 @@ https://example.com/schemas/common#/$defs/allOf/1 root output unit. - The root output unit contains "valid" for the overall result and "nested" + The root output unit contains "valid" for the overall result and "details" for the list of specific results. All other information is explicitly 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. + root output unit's "details" list with those errors or annotations. Output units which do not contain errors or annotations SHOULD be excluded @@ -3224,7 +3224,7 @@ https://example.com/schemas/common#/$defs/allOf/1 // failing results { "valid": false, - "nested": [ + "details": [ { "valid": false, "evaluationPath": "/properties/foo/allOf/0", @@ -3258,7 +3258,7 @@ https://example.com/schemas/common#/$defs/allOf/1 // passing results { "valid": true, - "nested": [ + "details": [ { "valid": true, "evaluationPath": "", @@ -3346,13 +3346,13 @@ https://example.com/schemas/common#/$defs/allOf/1 "evaluationPath": "", "schemaLocation": "https://json-schema.org/schemas/example#", "instanceLocation": "", - "nested": [ + "details": [ { "valid": false, "evaluationPath": "/properties/foo", "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo", "instanceLocation": "/foo", - "nested": [ + "details": [ { "valid": false, "evaluationPath": "/properties/foo/allOf/0", @@ -3371,7 +3371,7 @@ https://example.com/schemas/common#/$defs/allOf/1 "properties": [ "foo-prop" ], "title": "foo-title" }, - "nested": [ + "details": [ { "valid": false, "evaluationPath": "/properties/foo/allOf/1/properties/foo-prop", @@ -3399,7 +3399,7 @@ https://example.com/schemas/common#/$defs/allOf/1 "evaluationPath": "/properties/bar", "schemaLocation": "https://json-schema.org/schemas/example#/properties/bar", "instanceLocation": "/bar", - "nested": [ + "details": [ { "valid": false, "evaluationPath": "/properties/bar/$ref", @@ -3409,7 +3409,7 @@ https://example.com/schemas/common#/$defs/allOf/1 "properties": [ "bar-prop" ], "title": "bar-title" }, - "nested": [ + "details": [ { "valid": false, "evaluationPath": "/properties/bar/$ref/properties/bar-prop", @@ -3442,13 +3442,13 @@ https://example.com/schemas/common#/$defs/allOf/1 "bar" ] }, - "nested": [ + "details": [ { "valid": true, "evaluationPath": "/properties/foo", "schemaLocation": "https://json-schema.org/schemas/example#/properties/foo", "instanceLocation": "/foo", - "nested": [ + "details": [ { "valid": true, "evaluationPath": "/properties/foo/allOf/0", @@ -3469,7 +3469,7 @@ https://example.com/schemas/common#/$defs/allOf/1 "unspecified-prop" ] }, - "nested": [ + "details": [ { "valid": true, "evaluationPath": "/properties/foo/allOf/1/properties/foo-prop", @@ -3494,7 +3494,7 @@ https://example.com/schemas/common#/$defs/allOf/1 "evaluationPath": "/properties/bar", "schemaLocation": "https://json-schema.org/schemas/example#/properties/bar", "instanceLocation": "/bar", - "nested": [ + "details": [ { "valid": true, "evaluationPath": "/properties/bar/$ref", @@ -3506,7 +3506,7 @@ https://example.com/schemas/common#/$defs/allOf/1 "bar-prop" ] }, - "nested": [ + "details": [ { "valid": true, "evaluationPath": "/properties/bar/$ref/properties/bar-prop", From eed8b19b5d020c40fe37ec0d1f49f85b7cb1bbaf Mon Sep 17 00:00:00 2001 From: Greg Dennis Date: Thu, 24 Nov 2022 09:57:55 +1300 Subject: [PATCH 2/2] update basic to list --- jsonschema-core.xml | 10 +++++----- output/schema.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 8a9f2c10..53ea8c6b 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -2806,7 +2806,7 @@ with no further details. - Basic - Provides validation information in a flat list structure. + List - Provides validation information in a flat list structure. Hierarchical - Provides validation information in a hierarchical @@ -2815,7 +2815,7 @@ An implementation MUST provide the "flag" format and SHOULD provide at least one - of the "basic" or "hierarchical" formats. Implementations SHOULD specify in + of the "list" or "hierarchical" formats. Implementations SHOULD specify in their documentation which formats they support. @@ -2984,7 +2984,7 @@ https://example.com/schemas/common#/$defs/allOf/1 array of output units, even if only a single output unit is produced. - For "basic", this property will appear only at the root output unit + For "list", this property will appear only at the root output unit and will hold all output units in a flat list. @@ -3201,9 +3201,9 @@ https://example.com/schemas/common#/$defs/allOf/1
-
+
- The "Basic" structure is a flat list of output units contained within a + The "List" structure is a flat list of output units contained within a root output unit. diff --git a/output/schema.json b/output/schema.json index be2ec3fd..8487a290 100644 --- a/output/schema.json +++ b/output/schema.json @@ -5,7 +5,7 @@ "anyOf": [ { "$ref": "#/$defs/flag" }, - { "$ref": "#/$defs/basic" }, + { "$ref": "#/$defs/list" }, { "$ref": "#/$defs/hierarchical" } ], "$defs": { @@ -81,7 +81,7 @@ }, "required": [ "valid" ] }, - "basic": { + "list": { "properties": { "valid": { "type": "boolean" }, "nested": {