Skip to content

Commit

Permalink
Squashed 'json/' changes from 20c1bb1d9..54440eab4
Browse files Browse the repository at this point in the history
54440eab4 Merge pull request #516 from ChALkeR/chalker/ipv6
e7b22e1c6 Fix the sanity check by pinning.
8891d8107 Merge pull request #519 from json-schema-org/ether/custom-dialect
5f5fccda3 test the format-assertion vocabulary with a custom metaschema
3fcee3868 Merge pull request #512 from json-schema-org/ether/formats-and-non-strings
b349b8797 test that format-assertions are valid with non-string types
8e5b2f10d fix needless inconsistencies in format tests between drafts
02d7cb59a Correct "ref with sibling id" tests
1649470ba More ipv6 tests to increase coverage
7334b4c7e Merge pull request #505 from ChALkeR/chalker/fix-unicode
0fb2d2787 Consolidate optional/unicode into optional/ecmascript-regex
4f8c6d7bf unevaluatedProperties: deep dynamic   refs
9103f3b6f $ref wit id does not test what it is indented to do
f300dd15f Add test "same $anchor with different base uri"
d128f9d7f Add test to check that $id resolved against nearest parent, not just immediate parent
72e31dd20 Merge pull request #515 from json-schema-org/ether/fix-mandatory-format-tests
0173a0835 Revert "by default, "format" only annotates, not validates"
66e813a90 Merge pull request #506 from json-schema-org/ether/formats-non-ascii
9430972bc fix unicode tests in accordance to pattern/patternProperties spec

git-subtree-dir: json
git-subtree-split: 54440eab4d50b80a62cc9f9c561e306cdbb19591
  • Loading branch information
Julian committed Oct 7, 2021
1 parent b5e545b commit cf88638
Show file tree
Hide file tree
Showing 129 changed files with 5,355 additions and 1,289 deletions.
12 changes: 12 additions & 0 deletions remotes/draft2020-12/format-assertion-false.json
Original file line number Diff line number Diff line change
@@ -0,0 1,12 @@
{
"$id": "http://localhost:1234/draft2020-12/format-assertion-false.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$vocabulary": {
"https://json-schema.org/draft/2020-12/vocab/core": true,
"https://json-schema.org/draft/2020-12/vocab/format-assertion": false
},
"allOf": [
{ "$ref": "https://json-schema.org/draft/2020-12/schema/meta/core" },
{ "$ref": "https://json-schema.org/draft/2020-12/schema/meta/format-assertion" }
]
}
12 changes: 12 additions & 0 deletions remotes/draft2020-12/format-assertion-true.json
Original file line number Diff line number Diff line change
@@ -0,0 1,12 @@
{
"$id": "http://localhost:1234/draft2020-12/format-assertion-true.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$vocabulary": {
"https://json-schema.org/draft/2020-12/vocab/core": true,
"https://json-schema.org/draft/2020-12/vocab/format-assertion": true
},
"allOf": [
{ "$ref": "https://json-schema.org/draft/2020-12/schema/meta/core" },
{ "$ref": "https://json-schema.org/draft/2020-12/schema/meta/format-assertion" }
]
}
35 changes: 35 additions & 0 deletions tests/draft-future/anchor.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 134,40 @@
"valid": false
}
]
},
{
"description": "same $anchor with different base uri",
"schema": {
"$id": "http://localhost:1234/foobar",
"$defs": {
"A": {
"$id": "child1",
"allOf": [
{
"$id": "child2",
"$anchor": "my_anchor",
"type": "number"
},
{
"$anchor": "my_anchor",
"type": "string"
}
]
}
},
"$ref": "child1#my_anchor"
},
"tests": [
{
"description": "$ref should resolve to /$defs/A/allOf/1",
"data": "a",
"valid": true
},
{
"description": "$ref should not resolve to /$defs/A/allOf/0",
"data": 1,
"valid": false
}
]
}
]
95 changes: 0 additions & 95 deletions tests/draft-future/format.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 32,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid email string is only an annotation by default",
"data": "2962",
"valid": true
}
]
},
Expand Down Expand Up @@ -73,11 68,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid idn-email string is only an annotation by default",
"data": "2962",
"valid": true
}
]
},
Expand Down Expand Up @@ -114,11 104,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid regex string is only an annotation by default",
"data": "^(abc]",
"valid": true
}
]
},
Expand Down Expand Up @@ -155,11 140,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid ipv4 string is only an annotation by default",
"data": "127.0.0.0.1",
"valid": true
}
]
},
Expand Down Expand Up @@ -196,11 176,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid ipv6 string is only an annotation by default",
"data": "12345::",
"valid": true
}
]
},
Expand Down Expand Up @@ -237,11 212,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid idn-hostname string is only an annotation by default",
"data": "〮실례.테스트",
"valid": true
}
]
},
Expand Down Expand Up @@ -278,11 248,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid hostname string is only an annotation by default",
"data": "-a-host-name-that-starts-with--",
"valid": true
}
]
},
Expand Down Expand Up @@ -319,11 284,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid date string is only an annotation by default",
"data": "06/19/1963",
"valid": true
}
]
},
Expand Down Expand Up @@ -360,11 320,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid date-time string is only an annotation by default",
"data": "1990-02-31T15:59:60.123-08:00",
"valid": true
}
]
},
Expand Down Expand Up @@ -401,11 356,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid time string is only an annotation by default",
"data": "08:30:06 PST",
"valid": true
}
]
},
Expand Down Expand Up @@ -442,11 392,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid json-pointer string is only an annotation by default",
"data": "/foo/bar~",
"valid": true
}
]
},
Expand Down Expand Up @@ -483,11 428,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid relative-json-pointer string is only an annotation by default",
"data": "/foo/bar",
"valid": true
}
]
},
Expand Down Expand Up @@ -524,11 464,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid iri string is only an annotation by default",
"data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334",
"valid": true
}
]
},
Expand Down Expand Up @@ -565,11 500,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid iri-reference string is only an annotation by default",
"data": "\\\\WINDOWS\\filëßåré",
"valid": true
}
]
},
Expand Down Expand Up @@ -606,11 536,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid uri string is only an annotation by default",
"data": "//foo.bar/?baz=qux#quux",
"valid": true
}
]
},
Expand Down Expand Up @@ -647,11 572,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid uri-reference string is only an annotation by default",
"data": "\\\\WINDOWS\\fileshare",
"valid": true
}
]
},
Expand Down Expand Up @@ -688,11 608,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid uri-template string is only an annotation by default",
"data": "http://example.com/dictionary/{term:1}/{term",
"valid": true
}
]
},
Expand Down Expand Up @@ -729,11 644,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid uuid string is only an annotation by default",
"data": "2eb8aa08-aa98-11ea-b4aa-73b441d1638",
"valid": true
}
]
},
Expand Down Expand Up @@ -770,11 680,6 @@
"description": "all string formats ignore nulls",
"data": null,
"valid": true
},
{
"description": "invalid duration string is only an annotation by default",
"data": "PT1D",
"valid": true
}
]
}
Expand Down
Loading

0 comments on commit cf88638

Please sign in to comment.