Skip to content

Commit

Permalink
fix URIs and remove location props from root node on basic
Browse files Browse the repository at this point in the history
  • Loading branch information
gregsdennis committed Jul 1, 2022
1 parent d7feae6 commit 78b4cde
Showing 1 changed file with 28 additions and 33 deletions.
61 changes: 28 additions & 33 deletions jsonschema-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3036,7 +3036,9 @@ https://example.com/schemas/common#/$defs/count/minimum
<t>
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.
</t>
<t>
Output units which do not contain errors or annotations SHOULD be excluded
Expand All @@ -3049,23 +3051,20 @@ 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"
}
},
{
"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\""
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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"
Expand Down Expand Up @@ -3166,8 +3162,7 @@ https://example.com/schemas/common#/$defs/count/minimum
All output units are included in this format.
</t>
<t>
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.
</t>
<figure>
<artwork>
Expand All @@ -3187,32 +3182,32 @@ 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"
}
},
{
"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\""
}
},
{
"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"
}
]
Expand Down Expand Up @@ -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",
Expand All @@ -3290,17 +3285,17 @@ 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"
}
},
{
"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"
}
]
Expand Down

0 comments on commit 78b4cde

Please sign in to comment.