Skip to content

Commit d0c13fd

Browse files
authored
Merge pull request #1351 from json-schema-org/gregsdennis/output-nested-to-details
update output's `nested` to `details` & `basic` to `list`
2 parents 38bc78a + eed8b19 commit d0c13fd

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

jsonschema-core.xml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2806,7 +2806,7 @@
28062806
with no further details.
28072807
</t>
28082808
<t>
2809-
Basic - Provides validation information in a flat list structure.
2809+
List - Provides validation information in a flat list structure.
28102810
</t>
28112811
<t>
28122812
Hierarchical - Provides validation information in a hierarchical
@@ -2815,7 +2815,7 @@
28152815
</t>
28162816
</list>
28172817
An implementation MUST provide the "flag" format and SHOULD provide at least one
2818-
of the "basic" or "hierarchical" formats. Implementations SHOULD specify in
2818+
of the "list" or "hierarchical" formats. Implementations SHOULD specify in
28192819
their documentation which formats they support.
28202820
</t>
28212821

@@ -2974,30 +2974,30 @@ https://example.com/schemas/common#/$defs/allOf/1
29742974
</t>
29752975
</section>
29762976

2977-
<section title="Nested Results">
2977+
<section title="Results from Subschemas">
29782978
<t>
2979-
Nested results are generated from keywords which create a new dynamic
2980-
scope by applying a subschema to the instance or a child of the instance.
2979+
Evaluation results generated by applying a subschema to the instance
2980+
or a child of the instance.
29812981
Keywords which have multiple subschemas (e.g. "anyOf") will generally
29822982
generate an output unit for each subschema. In order to accommodate
29832983
potentially multiple results, the value of this property MUST be an
29842984
array of output units, even if only a single output unit is produced.
29852985
</t>
29862986
<t>
2987-
For "basic", this property will appear only at the root output unit
2987+
For "list", this property will appear only at the root output unit
29882988
and will hold all output units in a flat list.
29892989
</t>
29902990
<t>
2991-
For "hierarchical", this property will hold nested results in a tree
2992-
structure where each output unit may itself have nested results.
2991+
For "hierarchical", this property will contain results in a tree
2992+
structure where each output unit may itself have further nested results.
29932993
</t>
29942994
<t>
29952995
The sequence of output units within this list is not specified and
29962996
MAY be determined by the implementation. Sets of output units are
29972997
considered equivalent if they contain the same units, in any order.
29982998
</t>
29992999
<t>
3000-
The JSON key for nested results is "nested".
3000+
The JSON key for these additional results is "details".
30013001
</t>
30023002
</section>
30033003

@@ -3007,13 +3007,13 @@ https://example.com/schemas/common#/$defs/allOf/1
30073007
<t>
30083008
The output MUST be an object containing a boolean property named "valid". When
30093009
additional information about the result is required, the output MUST also contain
3010-
"nested" as described below.
3010+
"details" as described below.
30113011
<list>
30123012
<t>
30133013
"valid" - a boolean value indicating the overall validation success or failure
30143014
</t>
30153015
<t>
3016-
"nested" - the collection of results produced by subschemas
3016+
"details" - the collection of results produced by subschemas
30173017
</t>
30183018
</list>
30193019
For these examples, the following schema and instances will be used.
@@ -3201,17 +3201,17 @@ https://example.com/schemas/common#/$defs/allOf/1
32013201
</t>
32023202
</section>
32033203

3204-
<section title="Basic">
3204+
<section title="List">
32053205
<t>
3206-
The "Basic" structure is a flat list of output units contained within a
3206+
The "List" structure is a flat list of output units contained within a
32073207
root output unit.
32083208
</t>
32093209
<t>
3210-
The root output unit contains "valid" for the overall result and "nested"
3210+
The root output unit contains "valid" for the overall result and "details"
32113211
for the list of specific results. All other information is explicitly
32123212
omitted from the root output unit. If the root schema produces errors or
32133213
annotations, then the output node for the root MUST be present within the
3214-
root output unit's "nested" list with those errors or annotations.
3214+
root output unit's "details" list with those errors or annotations.
32153215
</t>
32163216
<t>
32173217
Output units which do not contain errors or annotations SHOULD be excluded
@@ -3224,7 +3224,7 @@ https://example.com/schemas/common#/$defs/allOf/1
32243224
// failing results
32253225
{
32263226
"valid": false,
3227-
"nested": [
3227+
"details": [
32283228
{
32293229
"valid": false,
32303230
"evaluationPath": "/properties/foo/allOf/0",
@@ -3258,7 +3258,7 @@ https://example.com/schemas/common#/$defs/allOf/1
32583258
// passing results
32593259
{
32603260
"valid": true,
3261-
"nested": [
3261+
"details": [
32623262
{
32633263
"valid": true,
32643264
"evaluationPath": "",
@@ -3346,13 +3346,13 @@ https://example.com/schemas/common#/$defs/allOf/1
33463346
"evaluationPath": "",
33473347
"schemaLocation": "https://json-schema.org/schemas/example#",
33483348
"instanceLocation": "",
3349-
"nested": [
3349+
"details": [
33503350
{
33513351
"valid": false,
33523352
"evaluationPath": "/properties/foo",
33533353
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo",
33543354
"instanceLocation": "/foo",
3355-
"nested": [
3355+
"details": [
33563356
{
33573357
"valid": false,
33583358
"evaluationPath": "/properties/foo/allOf/0",
@@ -3371,7 +3371,7 @@ https://example.com/schemas/common#/$defs/allOf/1
33713371
"properties": [ "foo-prop" ],
33723372
"title": "foo-title"
33733373
},
3374-
"nested": [
3374+
"details": [
33753375
{
33763376
"valid": false,
33773377
"evaluationPath": "/properties/foo/allOf/1/properties/foo-prop",
@@ -3399,7 +3399,7 @@ https://example.com/schemas/common#/$defs/allOf/1
33993399
"evaluationPath": "/properties/bar",
34003400
"schemaLocation": "https://json-schema.org/schemas/example#/properties/bar",
34013401
"instanceLocation": "/bar",
3402-
"nested": [
3402+
"details": [
34033403
{
34043404
"valid": false,
34053405
"evaluationPath": "/properties/bar/$ref",
@@ -3409,7 +3409,7 @@ https://example.com/schemas/common#/$defs/allOf/1
34093409
"properties": [ "bar-prop" ],
34103410
"title": "bar-title"
34113411
},
3412-
"nested": [
3412+
"details": [
34133413
{
34143414
"valid": false,
34153415
"evaluationPath": "/properties/bar/$ref/properties/bar-prop",
@@ -3442,13 +3442,13 @@ https://example.com/schemas/common#/$defs/allOf/1
34423442
"bar"
34433443
]
34443444
},
3445-
"nested": [
3445+
"details": [
34463446
{
34473447
"valid": true,
34483448
"evaluationPath": "/properties/foo",
34493449
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo",
34503450
"instanceLocation": "/foo",
3451-
"nested": [
3451+
"details": [
34523452
{
34533453
"valid": true,
34543454
"evaluationPath": "/properties/foo/allOf/0",
@@ -3469,7 +3469,7 @@ https://example.com/schemas/common#/$defs/allOf/1
34693469
"unspecified-prop"
34703470
]
34713471
},
3472-
"nested": [
3472+
"details": [
34733473
{
34743474
"valid": true,
34753475
"evaluationPath": "/properties/foo/allOf/1/properties/foo-prop",
@@ -3494,7 +3494,7 @@ https://example.com/schemas/common#/$defs/allOf/1
34943494
"evaluationPath": "/properties/bar",
34953495
"schemaLocation": "https://json-schema.org/schemas/example#/properties/bar",
34963496
"instanceLocation": "/bar",
3497-
"nested": [
3497+
"details": [
34983498
{
34993499
"valid": true,
35003500
"evaluationPath": "/properties/bar/$ref",
@@ -3506,7 +3506,7 @@ https://example.com/schemas/common#/$defs/allOf/1
35063506
"bar-prop"
35073507
]
35083508
},
3509-
"nested": [
3509+
"details": [
35103510
{
35113511
"valid": true,
35123512
"evaluationPath": "/properties/bar/$ref/properties/bar-prop",

output/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"anyOf": [
77
{ "$ref": "#/$defs/flag" },
8-
{ "$ref": "#/$defs/basic" },
8+
{ "$ref": "#/$defs/list" },
99
{ "$ref": "#/$defs/hierarchical" }
1010
],
1111
"$defs": {
@@ -81,7 +81,7 @@
8181
},
8282
"required": [ "valid" ]
8383
},
84-
"basic": {
84+
"list": {
8585
"properties": {
8686
"valid": { "type": "boolean" },
8787
"nested": {

0 commit comments

Comments
 (0)