diff options
author | Julian Berman <Julian@GrayVines.com> | 2021-10-07 09:13:10 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2021-10-07 09:13:10 -0400 |
commit | b59060c1d88beeecd4eef0fcf09fa1a87580fb38 (patch) | |
tree | 163b87be0c45e5cb31b7068acfba01f1755f2949 /json/tests/draft2020-12/optional/format-assertion.json | |
parent | 08f88a6ff67f51b971c210683f73fd96da998d29 (diff) | |
parent | cf886386cc0996df6743b425f74675a6d8a1a9ca (diff) | |
download | jsonschema-b59060c1d88beeecd4eef0fcf09fa1a87580fb38.tar.gz |
Merge commit 'cf886386cc0996df6743b425f74675a6d8a1a9ca'
* commit 'cf886386cc0996df6743b425f74675a6d8a1a9ca':
Squashed 'json/' changes from 20c1bb1d9..54440eab4
Diffstat (limited to 'json/tests/draft2020-12/optional/format-assertion.json')
-rw-r--r-- | json/tests/draft2020-12/optional/format-assertion.json | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/json/tests/draft2020-12/optional/format-assertion.json b/json/tests/draft2020-12/optional/format-assertion.json new file mode 100644 index 0000000..0340037 --- /dev/null +++ b/json/tests/draft2020-12/optional/format-assertion.json @@ -0,0 +1,42 @@ +[ + { + "description": "schema that uses custom metaschema with format-assertion: false", + "schema": { + "$id": "https://schema/using/format-assertion/false", + "$schema": "http://localhost:1234/draft2020-12/format-assertion-false.json", + "format": "ipv4" + }, + "tests": [ + { + "description": "format-assertion: false: valid string", + "data": "127.0.0.1", + "valid": true + }, + { + "description": "format-assertion: false: invalid string", + "data": "not-an-ipv4", + "valid": false + } + ] + }, + { + "description": "schema that uses custom metaschema with format-assertion: true", + "schema": { + "$id": "https://schema/using/format-assertion/true", + "$schema": "http://localhost:1234/draft2020-12/format-assertion-true.json", + "format": "ipv4" + }, + "tests": [ + { + "description": "format-assertion: true: valid string", + "data": "127.0.0.1", + "valid": true + }, + { + "description": "format-assertion: true: invalid string", + "data": "not-an-ipv4", + "valid": false + } + ] + } +] |