Skip to content

Initial run at draft/2019-04 tests, complete with output #265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
533 changes: 533 additions & 0 deletions tests/draft2019-04/additionalItems.json

Large diffs are not rendered by default.

827 changes: 827 additions & 0 deletions tests/draft2019-04/additionalProperties.json

Large diffs are not rendered by default.

1,663 changes: 1,663 additions & 0 deletions tests/draft2019-04/allOf.json

Large diffs are not rendered by default.

1,235 changes: 1,235 additions & 0 deletions tests/draft2019-04/anyOf.json

Large diffs are not rendered by default.

437 changes: 437 additions & 0 deletions tests/draft2019-04/boolean_schema.json

Large diffs are not rendered by default.

421 changes: 421 additions & 0 deletions tests/draft2019-04/const.json

Large diffs are not rendered by default.

914 changes: 914 additions & 0 deletions tests/draft2019-04/contains.json

Large diffs are not rendered by default.

191 changes: 191 additions & 0 deletions tests/draft2019-04/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
[
{
"description": "invalid type for default",
"schema": {"properties": {"foo": {"type": "integer", "default": []}}},
"tests": [
{
"description": "valid when property is specified",
"data": {"foo": 13},
"valid": true,
"output": {
"basic": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#"
},
"detailed": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#"
},
"verbose": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#",
"annotations": [
{
"valid": true,
"keywordLocation": "#/properties",
"instanceLocation": "#",
"keyword": "properties",
"annotations": [
{
"valid": true,
"keywordLocation": "#/properties/foo",
"instanceLocation": "#/foo",
"annotations": [
{
"valid": true,
"keywordLocation": "#/properties/foo/type",
"instanceLocation": "#/foo",
"keyword": "type"
},
{
"valid": true,
"keywordLocation": "#/properties/foo/default",
"instanceLocation": "#/foo",
"keyword": "default"
}
]
}
]
}
]
}
}
},
{
"description": "still valid when the invalid default is used",
"data": {},
"valid": true,
"output": {
"basic": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#"
},
"detailed": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#"
},
"verbose": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#",
"annotations": [
{
"valid": true,
"keywordLocation": "#/properties",
"instanceLocation": "#",
"keyword": "properties"
}
]
}
}
}
]
},
{
"description": "invalid string value for default",
"schema": {
"properties": {
"bar": {"type": "string", "minLength": 4, "default": "bad"}
}
},
"tests": [
{
"description": "valid when property is specified",
"data": {"bar": "good"},
"valid": true,
"output": {
"basic": {
"valid": true,
"keywordLocation": "#/properties/bar/default",
"instanceLocation": "#/bar",
"keyword": "default",
"annotation": "bad"
},
"detailed": {
"valid": true,
"keywordLocation": "#/properties/bar/default",
"instanceLocation": "#/bar",
"keyword": "default",
"annotation": "bad"
},
"verbose": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#",
"annotations": [
{
"valid": true,
"keywordLocation": "#/properties",
"instanceLocation": "#",
"keyword": "properties",
"annotations": [
{
"valid": true,
"keywordLocation": "#/properties/bar",
"instanceLocation": "#/bar",
"annotations": [
{
"valid": true,
"keywordLocation": "#/properties/bar/type",
"instanceLocation": "#/bar",
"keyword": "type"
},
{
"valid": true,
"keywordLocation": "#/properties/bar/minLength",
"instanceLocation": "#/bar",
"keyword": "minLength"
},
{
"valid": true,
"keywordLocation": "#/properties/bar/default",
"instanceLocation": "#/bar",
"keyword": "default",
"annotation": "bad"
}
]
}
]
}
]
}
}
},
{
"description": "still valid when the invalid default is used",
"data": {},
"valid": true,
"output": {
"basic": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#"
},
"detailed": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#"
},
"verbose": {
"valid": true,
"keywordLocation": "#",
"instanceLocation": "#",
"annotations": [
{
"valid": true,
"keywordLocation": "#/properties",
"instanceLocation": "#",
"keyword": "properties"
}
]
}
}
}
]
}
]
Loading