Skip to content

Commit

Permalink
use actual generated output for the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gregsdennis committed Jun 30, 2022
1 parent 8623727 commit d7feae6
Showing 1 changed file with 147 additions and 135 deletions.
282 changes: 147 additions & 135 deletions jsonschema-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3049,32 +3049,35 @@ https://example.com/schemas/common#/$defs/count/minimum
// failing results
{
"valid": false,
"evaluationPath": "",
"schemaLocation": "https://json-schema.org/schemas/example#",
"instanceLocation": "",
"nested": [
{
"evaluationPath": "/properties/foo/allOf/0",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo/allOf/0",
"valid": false,
"evaluationPath": "/properties/foo/0",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/0",
"instanceLocation": "/foo",
"errors": {
"type": "Expected the property \"unspecified-prop\"."
"required": "Required properties [\"unspecified-prop\"] were not present"
}
},
{
"evaluationPath": "/properties/foo/allOf/1/properties/foo-prop",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo/allOf/1/properties/foo-prop",
"valid": false,
"evaluationPath": "/properties/foo/1/properties/foo-prop",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1/properties/foo-prop",
"instanceLocation": "/foo/foo-prop",
"errors": {
"type": "Expected the value \"1\"."
"const": "Expected \"1\""
}
},
{
"valid": false,
"evaluationPath": "/properties/bar/$ref/properties/bar-prop",
"schemaLocation":
"https://json-schema.org/schemas/example#/$defs/bar/properties/bar-prop",
"schemaLocation": "https://json-schema.org/schemas/example#/$defs/bar/properties/bar-prop",
"instanceLocation": "/bar/bar-prop",
"errors": {
"type": "Expected a value of type \"integer\"."
"minimum": "2 is less than or equal to 10"
}
}
]
Expand All @@ -3083,65 +3086,63 @@ https://example.com/schemas/common#/$defs/count/minimum
// passing results
{
"valid": true,
"evaluationPath": "",
"schemaLocation": "https://json-schema.org/schemas/example#",
"instanceLocation": "",
"nested": [
{
"valid": true,
"evaluationPath": "",
"schemaLocation":
"https://json-schema.org/schemas/example#",
"schemaLocation": "https://json-schema.org/schemas/example#",
"instanceLocation": "",
"annotations": {
"title": "root",
"properties": [ "foo", "bar" ]
"properties": [
"foo",
"bar"
]
}
},
{
"valid": true,
"evaluationPath": "/properties/foo",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo",
"evaluationPath": "/properties/foo/1",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1",
"instanceLocation": "/foo",
"annotations": {
"title": "foo-title"
"title": "foo-title",
"properties": [
"foo-prop"
],
"additionalProperties": [
"unspecified-prop"
]
}
},
{
"valid": true,
"evaluationPath": "/properties/foo/allOf/1",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo/allOf/1",
"instanceLocation": "/foo/foo-prop",
"evaluationPath": "/properties/bar/$ref",
"schemaLocation": "https://json-schema.org/schemas/example#/$defs/bar",
"instanceLocation": "/bar",
"annotations": {
"properties": [ "foo-prop" ],
"additionalProperties": [ "unspecified-prop" ]
"title": "bar-title",
"properties": [
"bar-prop"
]
}
},
{
"valid": true,
"evaluationPath": "/properties/foo/allOf/1/properties/foo-prop",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo/allOf/1/properties/foo-prop",
"evaluationPath": "/properties/foo/1/properties/foo-prop",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1/properties/foo-prop",
"instanceLocation": "/foo/foo-prop",
"annotations": {
"title": "foo-prop-title"
}
},
{
"valid": true,
"evaluationPath": "/properties/bar/$ref",
"schemaLocation":
"https://json-schema.org/schemas/example#/$defs/bar",
"instanceLocation": "/bar",
"annotations": {
"title": "bar-title",
"properties": [ "bar-prop" ]
}
},
{
"valid": true,
"evaluationPath": "/properties/bar/$ref/properties/bar-prop",
"schemaLocation":
"https://json-schema.org/schemas/example#/$defs/bar/properties/bar-prop",
"schemaLocation": "https://json-schema.org/schemas/example#/$defs/bar/properties/bar-prop",
"instanceLocation": "/bar/bar-prop",
"annotations": {
"title": "bar-prop-title"
Expand Down Expand Up @@ -3173,122 +3174,134 @@ https://example.com/schemas/common#/$defs/count/minimum
<![CDATA[
// failing results (errors)
{
"valid": false,
"nested": [
{
"valid": false,
"evaluationPath": "/properties/foo",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo",
"instanceLocation": "/foo",
"nested": [
{
"valid": false,
"evaluationPath": "/properties/foo/allOf/0",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo/allOf/0",
"instanceLocation": "/foo",
"errors": {
"required": "Expected the property \"unspecified-prop\"."
}
},
{
"valid": false,
"evaluationPath": "/properties/foo/allOf/1",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo/allOf/1",
"instanceLocation": "/foo/foo-prop",
"nested": [
{
"valid": false,
"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 the value \"1\"."
}
}
]
"valid": false,
"evaluationPath": "",
"schemaLocation": "https://json-schema.org/schemas/example#",
"instanceLocation": "",
"nested": [
{
"valid": false,
"evaluationPath": "/properties/foo",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo",
"instanceLocation": "/foo",
"nested": [
{
"valid": false,
"evaluationPath": "/properties/foo/0",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/0",
"instanceLocation": "/foo",
"errors": {
"required": "Required properties [\"unspecified-prop\"] were not present"
}
]
},
{
"valid": false,
"evaluationPath": "/properties/bar",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/bar",
"instanceLocation": "/bar",
"nested": [
{
"valid": false,
"evaluationPath": "/properties/bar/$ref",
"schemaLocation":
"https://json-schema.org/schemas/example#/$defs/bar",
"instanceLocation": "/bar",
"nested": [
{
"valid": false,
"evaluationPath": "/properties/bar/$ref/properties/bar-prop",
"schemaLocation":
"https://json-schema.org/schemas/example#/$defs/bar/properties/bar-prop",
"instanceLocation": "/bar/bar-prop",
"errors": {
"type": "Expected a value of type \"integer\"."
}
},
{
"valid": false,
"evaluationPath": "/properties/foo/1",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/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",
"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",
"instanceLocation": "/foo/other-prop"
}
]
}
]
},
{
"valid": false,
"evaluationPath": "/properties/bar",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/bar",
"instanceLocation": "/bar",
"nested": [
{
"valid": false,
"evaluationPath": "/properties/bar/$ref",
"schemaLocation": "https://json-schema.org/schemas/example#/$defs/bar",
"instanceLocation": "/bar",
"nested": [
{
"valid": false,
"evaluationPath": "/properties/bar/$ref/properties/bar-prop",
"schemaLocation": "https://json-schema.org/schemas/example#/$defs/bar/properties/bar-prop",
"instanceLocation": "/bar/bar-prop",
"errors": {
"minimum": "2 is less than or equal to 10"
}
}
]
}
]
}
]
}
// passing results (annotations)
{
// passing results (annotations)
{
"valid": true,
"evaluationPath": "",
"schemaLocation": "https://json-schema.org/schemas/example#",
"instanceLocation": "",
"annotations": {
"title": "root",
"properties": [ "foo", "bar" ]
"properties": [
"foo",
"bar"
]
},
"nested": [
{
"valid": true,
"evaluationPath": "/properties/foo",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo",
"instanceLocation": "/foo",
"annotations": {
"title": "foo-title"
},
"nested": [
{
"valid": true,
"evaluationPath": "/properties/foo/allOf/0",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo/allOf/0",
"evaluationPath": "/properties/foo/0",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/0",
"instanceLocation": "/foo"
},
{
"valid": true,
"evaluationPath": "/properties/foo/allOf/1",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo/allOf/1",
"instanceLocation": "/foo/foo-prop",
"evaluationPath": "/properties/foo/1",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/1",
"instanceLocation": "/foo",
"annotations": {
"properties": [ "foo-prop" ],
"additionalProperties": [ "unspecified-prop" ]
"title": "foo-title",
"properties": [
"foo-prop"
],
"additionalProperties": [
"unspecified-prop"
]
},
"nested": [
{
"valid": true,
"evaluationPath": "/properties/foo/allOf/1/properties/foo-prop",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/foo/allOf/1/properties/foo-prop",
"evaluationPath": "/properties/foo/1/properties/foo-prop",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/foo/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",
"instanceLocation": "/foo/unspecified-prop"
}
]
}
Expand All @@ -3297,26 +3310,25 @@ https://example.com/schemas/common#/$defs/count/minimum
{
"valid": true,
"evaluationPath": "/properties/bar",
"schemaLocation":
"https://json-schema.org/schemas/example#/properties/bar",
"schemaLocation": "https://json-schema.org/schemas/example#/properties/bar",
"instanceLocation": "/bar",
"nested": [
{
"valid": true,
"evaluationPath": "/properties/bar/$ref",
"schemaLocation":
"https://json-schema.org/schemas/example#/$defs/bar",
"schemaLocation": "https://json-schema.org/schemas/example#/$defs/bar",
"instanceLocation": "/bar",
"annotations": {
"title": "bar-title",
"properties": [ "bar-prop" ]
"properties": [
"bar-prop"
]
},
"nested": [
{
"valid": true,
"evaluationPath": "/properties/bar/$ref/properties/bar-prop",
"schemaLocation":
"https://json-schema.org/schemas/example#/$defs/bar/properties/bar-prop",
"schemaLocation": "https://json-schema.org/schemas/example#/$defs/bar/properties/bar-prop",
"instanceLocation": "/bar/bar-prop",
"annotations": {
"title": "bar-prop-title"
Expand Down

0 comments on commit d7feae6

Please sign in to comment.