From fe81f109f63c0c8abc2e00ff000254b32d305aec Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 10 Jun 2024 21:25:05 -0400 Subject: [PATCH] Support JSON Schema Draft 7 in `test` and `validate` (#72) Signed-off-by: Juan Cruz Viotti --- DEPENDENCIES | 2 +- README.markdown | 2 +- test/CMakeLists.txt | 2 + test/lint_fix.sh | 4 +- test/validate_fail_draft7.sh | 34 + test/validate_pass_draft7.sh | 25 + vendor/jsontoolkit/CMakeLists.txt | 1 - vendor/jsontoolkit/Config.uk | 9 + vendor/jsontoolkit/Makefile.uk | 71 ++ vendor/jsontoolkit/src/json/CMakeLists.txt | 2 - vendor/jsontoolkit/src/jsonl/CMakeLists.txt | 2 - .../src/jsonpointer/CMakeLists.txt | 2 - .../jsontoolkit/src/jsonschema/CMakeLists.txt | 3 +- .../src/jsonschema/compile_describe.cc | 9 +- .../src/jsonschema/compile_evaluate.cc | 33 +- .../src/jsonschema/compile_json.cc | 5 + .../src/jsonschema/default_compiler.cc | 86 ++ .../src/jsonschema/default_compiler_draft7.h | 65 ++ .../jsontoolkit/jsonschema_compile.h | 19 +- .../jsontoolkit/src/jsonschema/reference.cc | 4 +- .../rules/additional_properties_default.h | 10 +- .../src/jsonschema/rules/const_with_type.h | 4 +- .../content_media_type_without_encoding.h | 4 +- .../jsonschema/rules/content_schema_default.h | 10 +- .../rules/content_schema_without_media_type.h | 4 +- .../src/jsonschema/rules/else_without_if.h | 4 +- .../src/jsonschema/rules/enum_to_const.h | 6 +- .../src/jsonschema/rules/enum_with_type.h | 4 +- .../jsonschema/rules/items_array_default.h | 4 +- .../jsonschema/rules/items_schema_default.h | 8 +- .../rules/max_contains_without_contains.h | 4 +- .../rules/min_contains_without_contains.h | 4 +- .../src/jsonschema/rules/single_type_array.h | 6 +- .../src/jsonschema/rules/then_without_if.h | 4 +- .../rules/unevaluated_items_default.h | 10 +- .../rules/unevaluated_properties_default.h | 10 +- vendor/jsontoolkit/src/uri/CMakeLists.txt | 2 - .../vendor/jsonschema-test-suite.mask | 2 - .../vendor/jsonschema-test-suite/LICENSE | 19 - .../remotes/baseUriChange/folderInteger.json | 3 - .../baseUriChangeFolder/folderInteger.json | 3 - .../folderInteger.json | 3 - .../remotes/draft6/detached-ref.json | 13 - .../remotes/integer.json | 3 - .../locationIndependentIdentifierDraft4.json | 11 - .../locationIndependentIdentifierPre2019.json | 11 - .../jsonschema-test-suite/remotes/name.json | 15 - .../remotes/nested/foo-ref-string.json | 6 - .../remotes/nested/string.json | 3 - .../remotes/ref-and-definitions.json | 11 - .../remotes/subSchemas.json | 10 - .../tests/draft4/additionalItems.json | 183 ---- .../tests/draft4/additionalProperties.json | 147 --- .../tests/draft4/allOf.json | 261 ----- .../tests/draft4/anyOf.json | 156 --- .../tests/draft4/default.json | 79 -- .../tests/draft4/definitions.json | 26 - .../tests/draft4/dependencies.json | 232 ----- .../tests/draft4/enum.json | 320 ------ .../tests/draft4/format.json | 218 ---- .../tests/draft4/infinite-loop-detection.json | 36 - .../tests/draft4/items.json | 227 ----- .../tests/draft4/maxItems.json | 28 - .../tests/draft4/maxLength.json | 33 - .../tests/draft4/maxProperties.json | 54 - .../tests/draft4/maximum.json | 99 -- .../tests/draft4/minItems.json | 28 - .../tests/draft4/minLength.json | 33 - .../tests/draft4/minProperties.json | 38 - .../tests/draft4/minimum.json | 114 --- .../tests/draft4/multipleOf.json | 82 -- .../tests/draft4/not.json | 157 --- .../tests/draft4/oneOf.json | 230 ----- .../tests/draft4/optional/bignum.json | 95 -- .../draft4/optional/ecmascript-regex.json | 552 ----------- .../tests/draft4/optional/float-overflow.json | 13 - .../draft4/optional/format/date-time.json | 133 --- .../tests/draft4/optional/format/email.json | 83 -- .../draft4/optional/format/hostname.json | 118 --- .../tests/draft4/optional/format/ipv4.json | 89 -- .../tests/draft4/optional/format/ipv6.json | 208 ---- .../tests/draft4/optional/format/unknown.json | 43 - .../tests/draft4/optional/format/uri.json | 138 --- .../tests/draft4/optional/id.json | 53 - .../tests/draft4/optional/non-bmp-regex.json | 82 -- .../draft4/optional/zeroTerminatedFloats.json | 15 - .../tests/draft4/pattern.json | 59 -- .../tests/draft4/patternProperties.json | 135 --- .../tests/draft4/properties.json | 205 ---- .../tests/draft4/ref.json | 592 ----------- .../tests/draft4/refRemote.json | 189 ---- .../tests/draft4/required.json | 135 --- .../tests/draft4/type.json | 469 --------- .../tests/draft4/uniqueItems.json | 409 -------- .../tests/draft6/additionalItems.json | 206 ---- .../tests/draft6/additionalProperties.json | 147 --- .../tests/draft6/allOf.json | 294 ------ .../tests/draft6/anyOf.json | 189 ---- .../tests/draft6/boolean_schema.json | 104 -- .../tests/draft6/const.json | 342 ------- .../tests/draft6/contains.json | 144 --- .../tests/draft6/default.json | 79 -- .../tests/draft6/definitions.json | 26 - .../tests/draft6/dependencies.json | 286 ------ .../tests/draft6/enum.json | 320 ------ .../tests/draft6/exclusiveMaximum.json | 30 - .../tests/draft6/exclusiveMinimum.json | 30 - .../tests/draft6/format.json | 326 ------ .../tests/draft6/infinite-loop-detection.json | 36 - .../tests/draft6/items.json | 282 ------ .../tests/draft6/maxItems.json | 44 - .../tests/draft6/maxLength.json | 49 - .../tests/draft6/maxProperties.json | 70 -- .../tests/draft6/maximum.json | 54 - .../tests/draft6/minItems.json | 44 - .../tests/draft6/minLength.json | 49 - .../tests/draft6/minProperties.json | 54 - .../tests/draft6/minimum.json | 69 -- .../tests/draft6/multipleOf.json | 82 -- .../tests/draft6/not.json | 259 ----- .../tests/draft6/oneOf.json | 274 ------ .../tests/draft6/optional/bignum.json | 93 -- .../draft6/optional/ecmascript-regex.json | 552 ----------- .../tests/draft6/optional/float-overflow.json | 13 - .../draft6/optional/format/date-time.json | 133 --- .../tests/draft6/optional/format/email.json | 83 -- .../draft6/optional/format/hostname.json | 118 --- .../tests/draft6/optional/format/ipv4.json | 89 -- .../tests/draft6/optional/format/ipv6.json | 208 ---- .../draft6/optional/format/json-pointer.json | 198 ---- .../tests/draft6/optional/format/unknown.json | 43 - .../draft6/optional/format/uri-reference.json | 73 -- .../draft6/optional/format/uri-template.json | 58 -- .../tests/draft6/optional/format/uri.json | 138 --- .../tests/draft6/optional/id.json | 134 --- .../tests/draft6/optional/non-bmp-regex.json | 82 -- .../tests/draft6/optional/unknownKeyword.json | 56 -- .../tests/draft6/pattern.json | 59 -- .../tests/draft6/patternProperties.json | 171 ---- .../tests/draft6/properties.json | 236 ----- .../tests/draft6/propertyNames.json | 107 -- .../tests/draft6/ref.json | 929 ------------------ .../tests/draft6/refRemote.json | 257 ----- .../tests/draft6/required.json | 151 --- .../tests/draft6/type.json | 474 --------- .../tests/draft6/uniqueItems.json | 409 -------- vendor/jsontoolkit/vendor/noa/cmake/noa.cmake | 3 +- .../noa/cmake/noa/compiler/options.cmake} | 17 +- .../vendor/noa/cmake/noa/library.cmake | 2 + 149 files changed, 424 insertions(+), 15538 deletions(-) create mode 100755 test/validate_fail_draft7.sh create mode 100755 test/validate_pass_draft7.sh create mode 100644 vendor/jsontoolkit/Config.uk create mode 100644 vendor/jsontoolkit/Makefile.uk create mode 100644 vendor/jsontoolkit/src/jsonschema/default_compiler_draft7.h delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/LICENSE delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChange/folderInteger.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChangeFolder/folderInteger.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChangeFolderInSubschema/folderInteger.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/draft6/detached-ref.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/integer.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/locationIndependentIdentifierDraft4.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/locationIndependentIdentifierPre2019.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/name.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/nested/foo-ref-string.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/nested/string.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/ref-and-definitions.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/subSchemas.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/additionalItems.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/additionalProperties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/allOf.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/anyOf.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/default.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/definitions.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/dependencies.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/enum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/format.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/infinite-loop-detection.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/items.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxItems.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxLength.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxProperties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maximum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minItems.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minLength.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minProperties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minimum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/multipleOf.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/not.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/oneOf.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/bignum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/ecmascript-regex.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/float-overflow.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/date-time.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/email.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/hostname.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/ipv4.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/ipv6.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/unknown.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/uri.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/id.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/non-bmp-regex.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/zeroTerminatedFloats.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/pattern.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/patternProperties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/properties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/ref.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/refRemote.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/required.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/type.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/uniqueItems.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/additionalItems.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/additionalProperties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/allOf.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/anyOf.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/boolean_schema.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/const.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/contains.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/default.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/definitions.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/dependencies.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/enum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/exclusiveMaximum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/exclusiveMinimum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/format.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/infinite-loop-detection.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/items.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxItems.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxLength.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxProperties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maximum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minItems.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minLength.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minProperties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minimum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/multipleOf.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/not.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/oneOf.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/bignum.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/ecmascript-regex.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/float-overflow.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/date-time.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/email.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/hostname.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/ipv4.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/ipv6.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/json-pointer.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/unknown.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri-reference.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri-template.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/id.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/non-bmp-regex.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/unknownKeyword.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/pattern.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/patternProperties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/properties.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/propertyNames.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/ref.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/refRemote.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/required.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/type.json delete mode 100644 vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/uniqueItems.json rename vendor/jsontoolkit/{cmake/CompilerOptions.cmake => vendor/noa/cmake/noa/compiler/options.cmake} (70%) diff --git a/DEPENDENCIES b/DEPENDENCIES index 2d7138b3..bd57a31a 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,4 +1,4 @@ vendorpull https://github.com/sourcemeta/vendorpull dea311b5bfb53b6926a4140267959ae334d3ecf4 noa https://github.com/sourcemeta/noa 5ff4024902642afc9cc2f9a9e02ae9dff9d15d4f -jsontoolkit https://github.com/sourcemeta/jsontoolkit 0f31b9576a2eb442c64b4005c9ae4b03dbbc7834 +jsontoolkit https://github.com/sourcemeta/jsontoolkit 573808a8e7f615a05d1afeaae83dade50eeac920 hydra https://github.com/sourcemeta/hydra 3c53d3fdef79e9ba603d48470a508cc45472a0dc diff --git a/README.markdown b/README.markdown index ab68b7eb..650a70d5 100644 --- a/README.markdown +++ b/README.markdown @@ -22,7 +22,7 @@ schemas**, both during local development and when running on CI/CD pipelines. > > **Current Limitations:** > -> - The `validate` and `test` commands only support JSON Schema Draft 4 and Draft 6 +> - The `validate` and `test` commands only support JSON Schema Draft 4, Draft 6, and Draft 7 > - It is not possible to collect annotations with the `validate` command What our users are saying diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2a54dbe7..9b2dd753 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -27,6 +27,8 @@ add_jsonschema_test_unix(validate_pass_draft4) add_jsonschema_test_unix(validate_fail_draft4) add_jsonschema_test_unix(validate_pass_draft6) add_jsonschema_test_unix(validate_fail_draft6) +add_jsonschema_test_unix(validate_pass_draft7) +add_jsonschema_test_unix(validate_fail_draft7) add_jsonschema_test_unix(validate_fail_remote_no_http) add_jsonschema_test_unix(validate_non_supported) add_jsonschema_test_unix(validate_pass_with_metaschema) diff --git a/test/lint_fix.sh b/test/lint_fix.sh index 62c0da09..13fd5214 100755 --- a/test/lint_fix.sh +++ b/test/lint_fix.sh @@ -9,7 +9,7 @@ trap clean EXIT cat << 'EOF' > "$TMP/schema.json" { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "string", "enum": [ "foo" ] } @@ -19,7 +19,7 @@ EOF cat << 'EOF' > "$TMP/expected.json" { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "const": "foo" } EOF diff --git a/test/validate_fail_draft7.sh b/test/validate_fail_draft7.sh new file mode 100755 index 00000000..5cbb40d3 --- /dev/null +++ b/test/validate_fail_draft7.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +set -o errexit +set -o nounset + +TMP="$(mktemp -d)" +clean() { rm -rf "$TMP"; } +trap clean EXIT + +cat << 'EOF' > "$TMP/schema.json" +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "foo": { + "type": "string" + } + } +} +EOF + +cat << 'EOF' > "$TMP/instance.json" +{ "foo": 1 } +EOF + +"$1" validate "$TMP/schema.json" "$TMP/instance.json" && CODE="$?" || CODE="$?" + +if [ "$CODE" = "0" ] +then + echo "FAIL" 1>&2 + exit 1 +else + echo "PASS" 1>&2 +fi diff --git a/test/validate_pass_draft7.sh b/test/validate_pass_draft7.sh new file mode 100755 index 00000000..7f2b7350 --- /dev/null +++ b/test/validate_pass_draft7.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -o errexit +set -o nounset + +TMP="$(mktemp -d)" +clean() { rm -rf "$TMP"; } +trap clean EXIT + +cat << 'EOF' > "$TMP/schema.json" +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "foo": { + "type": "string" + } + } +} +EOF + +cat << 'EOF' > "$TMP/instance.json" +{ "foo": "bar" } +EOF + +"$1" validate "$TMP/schema.json" "$TMP/instance.json" diff --git a/vendor/jsontoolkit/CMakeLists.txt b/vendor/jsontoolkit/CMakeLists.txt index 9a74fcbf..eca28f8c 100644 --- a/vendor/jsontoolkit/CMakeLists.txt +++ b/vendor/jsontoolkit/CMakeLists.txt @@ -4,7 +4,6 @@ project(jsontoolkit VERSION 2.0.0 LANGUAGES CXX HOMEPAGE_URL "https://jsontoolkit.sourcemeta.com") list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") include(vendor/noa/cmake/noa.cmake) -include(cmake/CompilerOptions.cmake) # Options option(JSONTOOLKIT_URI "Build the JSON Toolkit URI library" ON) diff --git a/vendor/jsontoolkit/Config.uk b/vendor/jsontoolkit/Config.uk new file mode 100644 index 00000000..923ffdea --- /dev/null +++ b/vendor/jsontoolkit/Config.uk @@ -0,0 +1,9 @@ +menuconfig LIBJSONTOOLKIT + bool "libjsontoolkit - a swiss-army knife library for expressive JSON programming in modern C++" + select LIBCXXABI + select LIBCXX + select CXX_THREADS + select LIBUNWIND + select LIBCOMPILER_RT + select LIBMUSL + default n diff --git a/vendor/jsontoolkit/Makefile.uk b/vendor/jsontoolkit/Makefile.uk new file mode 100644 index 00000000..ca1d1062 --- /dev/null +++ b/vendor/jsontoolkit/Makefile.uk @@ -0,0 +1,71 @@ +$(eval $(call addlib_s,libjsontoolkit,$(CONFIG_LIBJSONTOOLKIT))) + +# Flags +LIBJSONTOOLKIT_SRC = $(LIBJSONTOOLKIT_BASE)/src +LIBJSONTOOLKIT_CXXFLAGS-y += --std=c++20 + +# JSON +CXXINCLUDES-$(CONFIG_LIBJSONTOOLKIT) += -I$(LIBJSONTOOLKIT_SRC)/json/include +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/json/json.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/json/json_value.cc + +# JSONL +CXXINCLUDES-$(CONFIG_LIBJSONTOOLKIT) += -I$(LIBJSONTOOLKIT_SRC)/jsonl/include +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonl/jsonl.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonl/iterator.cc + +# JSON Pointer +CXXINCLUDES-$(CONFIG_LIBJSONTOOLKIT) += -I$(LIBJSONTOOLKIT_SRC)/jsonpointer/include +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonpointer/jsonpointer.cc + +# uriparser +CINCLUDES-$(CONFIG_LIBJSONTOOLKIT) += -I$(LIBJSONTOOLKIT_BASE)/vendor/uriparser/include +CXXINCLUDES-$(CONFIG_LIBJSONTOOLKIT) += -I$(LIBJSONTOOLKIT_BASE)/vendor/uriparser/include +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriCommon.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriCompare.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriEscape.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriFile.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriIp4.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriIp4Base.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriMemory.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriNormalize.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriNormalizeBase.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriParse.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriParseBase.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriQuery.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriRecompose.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriResolve.c +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BASE)/vendor/uriparser/src/UriShorten.c + +# URI +CXXINCLUDES-$(CONFIG_LIBJSONTOOLKIT) += -I$(LIBJSONTOOLKIT_SRC)/uri/include +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/uri/uri.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/uri/escaping.cc + +# JSON Schema +CXXINCLUDES-$(CONFIG_LIBJSONTOOLKIT) += -I$(LIBJSONTOOLKIT_SRC)/jsonschema/include +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/anchor.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/bundle.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/default_walker.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/jsonschema.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/walker.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/reference.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/transform_rule.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/transform_bundle.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/transformer.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/resolver.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/compile.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/compile_evaluate.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/compile_json.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/compile_describe.cc +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_SRC)/jsonschema/default_compiler.cc + +# TODO: Can we do this with standard POSIX tools? +$(LIBJSONTOOLKIT_BUILD)/official_resolver.cc: \ + $(LIBJSONTOOLKIT_SRC)/jsonschema/official_resolver.cmake \ + $(LIBJSONTOOLKIT_SRC)/jsonschema/official_resolver.in.cc + cmake "-DPROJECT_SOURCE_DIR=$(LIBJSONTOOLKIT_BASE)" \ + "-DOFFICIAL_RESOLVER_INPUT=$(word 2,$^)" \ + "-DOFFICIAL_RESOLVER_OUTPUT=$@" \ + -P "$<" +LIBJSONTOOLKIT_SRCS-y += $(LIBJSONTOOLKIT_BUILD)/official_resolver.cc diff --git a/vendor/jsontoolkit/src/json/CMakeLists.txt b/vendor/jsontoolkit/src/json/CMakeLists.txt index 1e660e6e..77e9cb20 100644 --- a/vendor/jsontoolkit/src/json/CMakeLists.txt +++ b/vendor/jsontoolkit/src/json/CMakeLists.txt @@ -6,5 +6,3 @@ noa_library(NAMESPACE sourcemeta PROJECT jsontoolkit NAME json if(JSONTOOLKIT_INSTALL) noa_library_install(NAMESPACE sourcemeta PROJECT jsontoolkit NAME json) endif() - -sourcemeta_jsontoolkit_add_compile_options(sourcemeta_jsontoolkit_json) diff --git a/vendor/jsontoolkit/src/jsonl/CMakeLists.txt b/vendor/jsontoolkit/src/jsonl/CMakeLists.txt index 44eed22e..e893fd78 100644 --- a/vendor/jsontoolkit/src/jsonl/CMakeLists.txt +++ b/vendor/jsontoolkit/src/jsonl/CMakeLists.txt @@ -9,5 +9,3 @@ endif() target_link_libraries(sourcemeta_jsontoolkit_jsonl PUBLIC sourcemeta::jsontoolkit::json) - -sourcemeta_jsontoolkit_add_compile_options(sourcemeta_jsontoolkit_jsonl) diff --git a/vendor/jsontoolkit/src/jsonpointer/CMakeLists.txt b/vendor/jsontoolkit/src/jsonpointer/CMakeLists.txt index 4fb11ba1..603da303 100644 --- a/vendor/jsontoolkit/src/jsonpointer/CMakeLists.txt +++ b/vendor/jsontoolkit/src/jsonpointer/CMakeLists.txt @@ -11,5 +11,3 @@ target_link_libraries(sourcemeta_jsontoolkit_jsonpointer PUBLIC sourcemeta::jsontoolkit::uri) target_link_libraries(sourcemeta_jsontoolkit_jsonpointer PUBLIC sourcemeta::jsontoolkit::json) - -sourcemeta_jsontoolkit_add_compile_options(sourcemeta_jsontoolkit_jsonpointer) diff --git a/vendor/jsontoolkit/src/jsonschema/CMakeLists.txt b/vendor/jsontoolkit/src/jsonschema/CMakeLists.txt index 355d39f7..e53f24fc 100644 --- a/vendor/jsontoolkit/src/jsonschema/CMakeLists.txt +++ b/vendor/jsontoolkit/src/jsonschema/CMakeLists.txt @@ -10,6 +10,7 @@ noa_library(NAMESPACE sourcemeta PROJECT jsontoolkit NAME jsonschema walker.cc bundle.cc transformer.cc transform_rule.cc transform_bundle.cc compile.cc compile_evaluate.cc compile_json.cc compile_describe.cc compile_helpers.h default_compiler.cc + default_compiler_draft7.h default_compiler_draft6.h default_compiler_draft4.h @@ -43,8 +44,6 @@ target_link_libraries(sourcemeta_jsontoolkit_jsonschema PUBLIC target_link_libraries(sourcemeta_jsontoolkit_jsonschema PRIVATE sourcemeta::jsontoolkit::uri) -sourcemeta_jsontoolkit_add_compile_options(sourcemeta_jsontoolkit_jsonschema) - # GCC does not allow the use of std::promise, std::future # without compiling with pthreads support. if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") diff --git a/vendor/jsontoolkit/src/jsonschema/compile_describe.cc b/vendor/jsontoolkit/src/jsonschema/compile_describe.cc index 569ec733..f01527ae 100644 --- a/vendor/jsontoolkit/src/jsonschema/compile_describe.cc +++ b/vendor/jsontoolkit/src/jsonschema/compile_describe.cc @@ -17,6 +17,9 @@ struct DescribeVisitor { return "The target is expected to match one and only one of the given " "assertions"; } + auto operator()(const SchemaCompilerLogicalTry &) const -> std::string { + return "The target might match all of the given assertions"; + } auto operator()(const SchemaCompilerLogicalNot &) const -> std::string { return "The given schema is expected to not validate successfully"; } @@ -25,6 +28,10 @@ struct DescribeVisitor { return "Internal"; } auto + operator()(const SchemaCompilerInternalAnnotation &) const -> std::string { + return "The target was annotated with the given value"; + } + auto operator()(const SchemaCompilerInternalNoAnnotation &) const -> std::string { return "The target was not annotated with the given value"; } @@ -98,7 +105,7 @@ struct DescribeVisitor { } auto operator()(const SchemaCompilerAssertionEqual &) const -> std::string { - return "The target size is expected to be equal to the given number"; + return "The target is expected to be equal to the given value"; } auto operator()(const SchemaCompilerAssertionGreaterEqual &) const { return "The target number is expected to be greater than or equal to the " diff --git a/vendor/jsontoolkit/src/jsonschema/compile_evaluate.cc b/vendor/jsontoolkit/src/jsonschema/compile_evaluate.cc index 72fbf453..044dbd2b 100644 --- a/vendor/jsontoolkit/src/jsonschema/compile_evaluate.cc +++ b/vendor/jsontoolkit/src/jsonschema/compile_evaluate.cc @@ -106,12 +106,14 @@ class EvaluationContext { // An optimization for efficiently accessing annotations if constexpr (std::is_same_v) { - assert(target.first == - SchemaCompilerTargetType::ParentAdjacentAnnotations); const auto schema_location{ this->evaluate_path().initial().concat(target.second)}; - return this->annotations(this->instance_location().initial(), - schema_location); + if (target.first == SchemaCompilerTargetType::ParentAdjacentAnnotations) { + return this->annotations(this->instance_location().initial(), + schema_location); + } else { + return this->annotations(this->instance_location(), schema_location); + } } else { static_assert(std::is_same_v); switch (target.first) { @@ -449,6 +451,17 @@ auto evaluate_step( break; } } + } else if (std::holds_alternative(step)) { + const auto &logical{std::get(step)}; + assert(std::holds_alternative(logical.value)); + context.push(logical); + EVALUATE_CONDITION_GUARD(logical.condition, instance); + result = true; + for (const auto &child : logical.children) { + if (!evaluate_step(child, instance, mode, callback, context)) { + break; + } + } } else if (std::holds_alternative(step)) { const auto &logical{std::get(step)}; assert(std::holds_alternative(logical.value)); @@ -463,6 +476,18 @@ auto evaluate_step( } } } + } else if (std::holds_alternative(step)) { + const auto &assertion{std::get(step)}; + context.push(assertion); + EVALUATE_CONDITION_GUARD(assertion.condition, instance); + const auto &value{context.resolve_value(assertion.value, instance)}; + const auto &target{ + context.resolve_target>(assertion.target, instance)}; + result = target.contains(value); + + // We treat this step as transparent to the consumer + context.pop(); + return result; } else if (std::holds_alternative(step)) { const auto &assertion{std::get(step)}; context.push(assertion); diff --git a/vendor/jsontoolkit/src/jsonschema/compile_json.cc b/vendor/jsontoolkit/src/jsonschema/compile_json.cc index 7afbe02e..b31ac74f 100644 --- a/vendor/jsontoolkit/src/jsonschema/compile_json.cc +++ b/vendor/jsontoolkit/src/jsonschema/compile_json.cc @@ -24,6 +24,9 @@ auto target_to_json(const sourcemeta::jsontoolkit::SchemaCompilerTarget &target) case SchemaCompilerTargetType::InstanceParent: result.assign("type", JSON{"instance-parent"}); return result; + case SchemaCompilerTargetType::AdjacentAnnotations: + result.assign("type", JSON{"adjacent-annotations"}); + return result; case SchemaCompilerTargetType::ParentAdjacentAnnotations: result.assign("type", JSON{"parent-adjacent-annotations"}); return result; @@ -200,7 +203,9 @@ struct StepVisitor { HANDLE_STEP("logical", "or", SchemaCompilerLogicalOr) HANDLE_STEP("logical", "and", SchemaCompilerLogicalAnd) HANDLE_STEP("logical", "xor", SchemaCompilerLogicalXor) + HANDLE_STEP("logical", "try", SchemaCompilerLogicalTry) HANDLE_STEP("logical", "not", SchemaCompilerLogicalNot) + HANDLE_STEP("internal", "annotation", SchemaCompilerInternalAnnotation) HANDLE_STEP("internal", "no-annotation", SchemaCompilerInternalNoAnnotation) HANDLE_STEP("internal", "container", SchemaCompilerInternalContainer) HANDLE_STEP("internal", "defines-all", SchemaCompilerInternalDefinesAll) diff --git a/vendor/jsontoolkit/src/jsonschema/default_compiler.cc b/vendor/jsontoolkit/src/jsonschema/default_compiler.cc index d86b7c6f..edf2858b 100644 --- a/vendor/jsontoolkit/src/jsonschema/default_compiler.cc +++ b/vendor/jsontoolkit/src/jsonschema/default_compiler.cc @@ -3,6 +3,7 @@ #include "default_compiler_draft4.h" #include "default_compiler_draft6.h" +#include "default_compiler_draft7.h" #include // assert #include // std::set @@ -16,6 +17,7 @@ auto sourcemeta::jsontoolkit::default_schema_compiler( assert(!context.keyword.empty()); static std::set SUPPORTED_VOCABULARIES{ + "http://json-schema.org/draft-07/schema#", "http://json-schema.org/draft-06/schema#", "http://json-schema.org/draft-04/schema#"}; for (const auto &vocabulary : context.vocabularies) { @@ -41,6 +43,90 @@ auto sourcemeta::jsontoolkit::default_schema_compiler( return {}; \ } + // ******************************************** + // DRAFT 7 + // ******************************************** + + COMPILE("http://json-schema.org/draft-07/schema#", "$ref", + compiler_draft4_core_ref); + STOP_IF_SIBLING_KEYWORD("http://json-schema.org/draft-07/schema#", "$ref"); + + // Any + COMPILE("http://json-schema.org/draft-07/schema#", "if", + compiler_draft7_applicator_if); + COMPILE("http://json-schema.org/draft-07/schema#", "then", + compiler_draft7_applicator_then); + COMPILE("http://json-schema.org/draft-07/schema#", "else", + compiler_draft7_applicator_else); + + // Same as Draft 6 + + COMPILE("http://json-schema.org/draft-07/schema#", "type", + compiler_draft6_validation_type); + COMPILE("http://json-schema.org/draft-07/schema#", "const", + compiler_draft6_validation_const); + COMPILE("http://json-schema.org/draft-07/schema#", "contains", + compiler_draft6_applicator_contains); + COMPILE("http://json-schema.org/draft-07/schema#", "propertyNames", + compiler_draft6_validation_propertynames); + COMPILE("http://json-schema.org/draft-07/schema#", "exclusiveMaximum", + compiler_draft6_validation_exclusivemaximum); + COMPILE("http://json-schema.org/draft-07/schema#", "exclusiveMinimum", + compiler_draft6_validation_exclusiveminimum); + + // Same as Draft 4 + + COMPILE("http://json-schema.org/draft-07/schema#", "allOf", + compiler_draft4_applicator_allof); + COMPILE("http://json-schema.org/draft-07/schema#", "anyOf", + compiler_draft4_applicator_anyof); + COMPILE("http://json-schema.org/draft-07/schema#", "oneOf", + compiler_draft4_applicator_oneof); + COMPILE("http://json-schema.org/draft-07/schema#", "not", + compiler_draft4_applicator_not); + COMPILE("http://json-schema.org/draft-07/schema#", "enum", + compiler_draft4_validation_enum); + + COMPILE("http://json-schema.org/draft-07/schema#", "items", + compiler_draft4_applicator_items); + COMPILE("http://json-schema.org/draft-07/schema#", "additionalItems", + compiler_draft4_applicator_additionalitems); + COMPILE("http://json-schema.org/draft-07/schema#", "uniqueItems", + compiler_draft4_validation_uniqueitems); + COMPILE("http://json-schema.org/draft-07/schema#", "maxItems", + compiler_draft4_validation_maxitems); + COMPILE("http://json-schema.org/draft-07/schema#", "minItems", + compiler_draft4_validation_minitems); + + COMPILE("http://json-schema.org/draft-07/schema#", "required", + compiler_draft4_validation_required); + COMPILE("http://json-schema.org/draft-07/schema#", "maxProperties", + compiler_draft4_validation_maxproperties); + COMPILE("http://json-schema.org/draft-07/schema#", "minProperties", + compiler_draft4_validation_minproperties); + COMPILE("http://json-schema.org/draft-07/schema#", "properties", + compiler_draft4_applicator_properties); + COMPILE("http://json-schema.org/draft-07/schema#", "patternProperties", + compiler_draft4_applicator_patternproperties); + COMPILE("http://json-schema.org/draft-07/schema#", "additionalProperties", + compiler_draft4_applicator_additionalproperties); + COMPILE("http://json-schema.org/draft-07/schema#", "dependencies", + compiler_draft4_applicator_dependencies); + + COMPILE("http://json-schema.org/draft-07/schema#", "maximum", + compiler_draft4_validation_maximum); + COMPILE("http://json-schema.org/draft-07/schema#", "minimum", + compiler_draft4_validation_minimum); + COMPILE("http://json-schema.org/draft-07/schema#", "multipleOf", + compiler_draft4_validation_multipleof); + + COMPILE("http://json-schema.org/draft-07/schema#", "maxLength", + compiler_draft4_validation_maxlength); + COMPILE("http://json-schema.org/draft-07/schema#", "minLength", + compiler_draft4_validation_minlength); + COMPILE("http://json-schema.org/draft-07/schema#", "pattern", + compiler_draft4_validation_pattern); + // ******************************************** // DRAFT 6 // ******************************************** diff --git a/vendor/jsontoolkit/src/jsonschema/default_compiler_draft7.h b/vendor/jsontoolkit/src/jsonschema/default_compiler_draft7.h new file mode 100644 index 00000000..c7e413aa --- /dev/null +++ b/vendor/jsontoolkit/src/jsonschema/default_compiler_draft7.h @@ -0,0 +1,65 @@ +#ifndef SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_DEFAULT_COMPILER_DRAFT7_H_ +#define SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_DEFAULT_COMPILER_DRAFT7_H_ + +#include +#include + +#include "compile_helpers.h" + +namespace internal { +using namespace sourcemeta::jsontoolkit; + +auto compiler_draft7_applicator_if(const SchemaCompilerContext &context) + -> SchemaCompilerTemplate { + const auto subcontext{applicate(context)}; + SchemaCompilerTemplate children{ + compile(subcontext, empty_pointer, empty_pointer)}; + children.push_back(make( + subcontext, JSON{true}, {}, SchemaCompilerTargetType::Instance)); + return {make(context, SchemaCompilerValueNone{}, + std::move(children), + SchemaCompilerTemplate{})}; +} + +auto compiler_draft7_applicator_then(const SchemaCompilerContext &context) + -> SchemaCompilerTemplate { + assert(context.schema.is_object()); + + // Nothing to do here + if (!context.schema.defines("if")) { + return {}; + } + + const auto subcontext{applicate(context)}; + SchemaCompilerTemplate children{ + compile(subcontext, empty_pointer, empty_pointer)}; + SchemaCompilerTemplate condition{make( + subcontext, JSON{true}, {}, SchemaCompilerTargetType::AdjacentAnnotations, + Pointer{"if"})}; + return {make(context, SchemaCompilerValueNone{}, + std::move(children), + std::move(condition))}; +} + +auto compiler_draft7_applicator_else(const SchemaCompilerContext &context) + -> SchemaCompilerTemplate { + assert(context.schema.is_object()); + + // Nothing to do here + if (!context.schema.defines("if")) { + return {}; + } + + const auto subcontext{applicate(context)}; + SchemaCompilerTemplate children{ + compile(subcontext, empty_pointer, empty_pointer)}; + SchemaCompilerTemplate condition{make( + subcontext, JSON{true}, {}, SchemaCompilerTargetType::AdjacentAnnotations, + Pointer{"if"})}; + return {make(context, SchemaCompilerValueNone{}, + std::move(children), + std::move(condition))}; +} + +} // namespace internal +#endif diff --git a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_compile.h b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_compile.h index 4dc6f25b..5d88dda4 100644 --- a/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_compile.h +++ b/vendor/jsontoolkit/src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_compile.h @@ -39,6 +39,10 @@ enum class SchemaCompilerTargetType { /// The penultimate path (i.e. property or index) of the instance location InstanceParent, + /// The annotations produced at the same base evaluation path for the + /// current instance location + AdjacentAnnotations, + /// The annotations produced at the same base evaluation path for the parent /// of the current instance location ParentAdjacentAnnotations @@ -216,10 +220,20 @@ struct SchemaCompilerLogicalAnd; /// Represents a compiler logical step that represents an exclusive disjunction struct SchemaCompilerLogicalXor; +/// @ingroup jsonschema +/// Represents a compiler logical step that represents a conjunction that always +/// reports success +struct SchemaCompilerLogicalTry; + /// @ingroup jsonschema /// Represents a compiler logical step that represents a negation struct SchemaCompilerLogicalNot; +/// @ingroup jsonschema +/// Represents a hidden compiler assertion step that checks a certain +/// annotation was produced +struct SchemaCompilerInternalAnnotation; + /// @ingroup jsonschema /// Represents a hidden compiler assertion step that checks a certain /// annotation was not produced @@ -275,7 +289,8 @@ using SchemaCompilerTemplate = std::vector void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/const_with_type.h b/vendor/jsontoolkit/src/jsonschema/rules/const_with_type.h index f93c166c..e88559f8 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/const_with_type.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/const_with_type.h @@ -14,9 +14,9 @@ class ConstWithType final : public SchemaTransformRule { {"https://json-schema.org/draft/2020-12/vocab/validation", "https://json-schema.org/draft/2019-09/vocab/validation", "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#"}), + "http://json-schema.org/draft-06/schema#"}) && schema.is_object() && schema.defines("type") && - schema.defines("const"); + schema.defines("const"); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/content_media_type_without_encoding.h b/vendor/jsontoolkit/src/jsonschema/rules/content_media_type_without_encoding.h index e5b9f9fd..797148cc 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/content_media_type_without_encoding.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/content_media_type_without_encoding.h @@ -12,9 +12,9 @@ class ContentMediaTypeWithoutEncoding final : public SchemaTransformRule { return contains_any(vocabularies, {"https://json-schema.org/draft/2020-12/vocab/content", "https://json-schema.org/draft/2019-09/vocab/content", - "http://json-schema.org/draft-07/schema#"}), + "http://json-schema.org/draft-07/schema#"}) && schema.is_object() && schema.defines("contentMediaType") && - !schema.defines("contentEncoding"); + !schema.defines("contentEncoding"); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/content_schema_default.h b/vendor/jsontoolkit/src/jsonschema/rules/content_schema_default.h index 09562232..d9c89297 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/content_schema_default.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/content_schema_default.h @@ -12,12 +12,12 @@ class ContentSchemaDefault final : public SchemaTransformRule { return contains_any( vocabularies, {"https://json-schema.org/draft/2020-12/vocab/content", - "https://json-schema.org/draft/2019-09/vocab/content"}), + "https://json-schema.org/draft/2019-09/vocab/content"}) && schema.is_object() && schema.defines("contentSchema") && - ((schema.at("contentSchema").is_boolean() && - schema.at("contentSchema").to_boolean()) || - (schema.at("contentSchema").is_object() && - schema.at("contentSchema").empty())); + ((schema.at("contentSchema").is_boolean() && + schema.at("contentSchema").to_boolean()) || + (schema.at("contentSchema").is_object() && + schema.at("contentSchema").empty())); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/content_schema_without_media_type.h b/vendor/jsontoolkit/src/jsonschema/rules/content_schema_without_media_type.h index 05fa59d3..0eb6f949 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/content_schema_without_media_type.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/content_schema_without_media_type.h @@ -12,9 +12,9 @@ class ContentSchemaWithoutMediaType final : public SchemaTransformRule { return contains_any( vocabularies, {"https://json-schema.org/draft/2020-12/vocab/content", - "https://json-schema.org/draft/2019-09/vocab/content"}), + "https://json-schema.org/draft/2019-09/vocab/content"}) && schema.is_object() && schema.defines("contentSchema") && - !schema.defines("contentMediaType"); + !schema.defines("contentMediaType"); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/else_without_if.h b/vendor/jsontoolkit/src/jsonschema/rules/else_without_if.h index ff7e9a09..de28fa34 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/else_without_if.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/else_without_if.h @@ -12,9 +12,9 @@ class ElseWithoutIf final : public SchemaTransformRule { vocabularies, {"https://json-schema.org/draft/2020-12/vocab/applicator", "https://json-schema.org/draft/2019-09/vocab/applicator", - "http://json-schema.org/draft-07/schema#"}), + "http://json-schema.org/draft-07/schema#"}) && schema.is_object() && schema.defines("else") && - !schema.defines("if"); + !schema.defines("if"); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/enum_to_const.h b/vendor/jsontoolkit/src/jsonschema/rules/enum_to_const.h index 475ea375..9cafc33c 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/enum_to_const.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/enum_to_const.h @@ -13,10 +13,10 @@ class EnumToConst final : public SchemaTransformRule { {"https://json-schema.org/draft/2020-12/vocab/validation", "https://json-schema.org/draft/2019-09/vocab/validation", "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#"}), + "http://json-schema.org/draft-06/schema#"}) && schema.is_object() && !schema.defines("const") && - schema.defines("enum") && schema.at("enum").is_array() && - schema.at("enum").size() == 1; + schema.defines("enum") && schema.at("enum").is_array() && + schema.at("enum").size() == 1; } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/enum_with_type.h b/vendor/jsontoolkit/src/jsonschema/rules/enum_with_type.h index 618bc428..357f0a3f 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/enum_with_type.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/enum_with_type.h @@ -18,9 +18,9 @@ class EnumWithType final : public SchemaTransformRule { "http://json-schema.org/draft-04/schema#", "http://json-schema.org/draft-03/schema#", "http://json-schema.org/draft-02/hyper-schema#", - "http://json-schema.org/draft-01/hyper-schema#"}), + "http://json-schema.org/draft-01/hyper-schema#"}) && schema.is_object() && schema.defines("type") && - schema.defines("enum"); + schema.defines("enum"); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/items_array_default.h b/vendor/jsontoolkit/src/jsonschema/rules/items_array_default.h index 3ec583a4..932cfbef 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/items_array_default.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/items_array_default.h @@ -16,9 +16,9 @@ class ItemsArrayDefault final : public SchemaTransformRule { "http://json-schema.org/draft-04/schema#", "http://json-schema.org/draft-03/schema#", "http://json-schema.org/draft-02/hyper-schema#", - "http://json-schema.org/draft-01/hyper-schema#"}), + "http://json-schema.org/draft-01/hyper-schema#"}) && schema.is_object() && schema.defines("items") && - schema.at("items").is_array() && schema.at("items").empty(); + schema.at("items").is_array() && schema.at("items").empty(); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/items_schema_default.h b/vendor/jsontoolkit/src/jsonschema/rules/items_schema_default.h index 9a6d5005..e9c4aa22 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/items_schema_default.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/items_schema_default.h @@ -17,11 +17,11 @@ class ItemsSchemaDefault final : public SchemaTransformRule { "http://json-schema.org/draft-04/schema#", "http://json-schema.org/draft-03/schema#", "http://json-schema.org/draft-02/hyper-schema#", - "http://json-schema.org/draft-01/hyper-schema#"}), + "http://json-schema.org/draft-01/hyper-schema#"}) && schema.is_object() && schema.defines("items") && - ((schema.at("items").is_boolean() && - schema.at("items").to_boolean()) || - (schema.at("items").is_object() && schema.at("items").empty())); + ((schema.at("items").is_boolean() && + schema.at("items").to_boolean()) || + (schema.at("items").is_object() && schema.at("items").empty())); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/max_contains_without_contains.h b/vendor/jsontoolkit/src/jsonschema/rules/max_contains_without_contains.h index 769d1c82..92fad301 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/max_contains_without_contains.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/max_contains_without_contains.h @@ -12,9 +12,9 @@ class MaxContainsWithoutContains final : public SchemaTransformRule { return contains_any( vocabularies, {"https://json-schema.org/draft/2020-12/vocab/validation", - "https://json-schema.org/draft/2019-09/vocab/validation"}), + "https://json-schema.org/draft/2019-09/vocab/validation"}) && schema.is_object() && schema.defines("maxContains") && - !schema.defines("contains"); + !schema.defines("contains"); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/min_contains_without_contains.h b/vendor/jsontoolkit/src/jsonschema/rules/min_contains_without_contains.h index 612e97e6..d2877149 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/min_contains_without_contains.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/min_contains_without_contains.h @@ -12,9 +12,9 @@ class MinContainsWithoutContains final : public SchemaTransformRule { return contains_any( vocabularies, {"https://json-schema.org/draft/2020-12/vocab/validation", - "https://json-schema.org/draft/2019-09/vocab/validation"}), + "https://json-schema.org/draft/2019-09/vocab/validation"}) && schema.is_object() && schema.defines("minContains") && - !schema.defines("contains"); + !schema.defines("contains"); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/single_type_array.h b/vendor/jsontoolkit/src/jsonschema/rules/single_type_array.h index 7ef66ca6..56d1a11c 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/single_type_array.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/single_type_array.h @@ -18,10 +18,10 @@ class SingleTypeArray final : public SchemaTransformRule { "http://json-schema.org/draft-03/schema#", "http://json-schema.org/draft-02/hyper-schema#", "http://json-schema.org/draft-01/hyper-schema#", - "http://json-schema.org/draft-00/hyper-schema#"}), + "http://json-schema.org/draft-00/hyper-schema#"}) && schema.is_object() && schema.defines("type") && - schema.at("type").is_array() && schema.at("type").size() == 1 && - schema.at("type").front().is_string(); + schema.at("type").is_array() && schema.at("type").size() == 1 && + schema.at("type").front().is_string(); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/then_without_if.h b/vendor/jsontoolkit/src/jsonschema/rules/then_without_if.h index fccb6fe8..4b53e5e8 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/then_without_if.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/then_without_if.h @@ -12,9 +12,9 @@ class ThenWithoutIf final : public SchemaTransformRule { vocabularies, {"https://json-schema.org/draft/2020-12/vocab/applicator", "https://json-schema.org/draft/2019-09/vocab/applicator", - "http://json-schema.org/draft-07/schema#"}), + "http://json-schema.org/draft-07/schema#"}) && schema.is_object() && schema.defines("then") && - !schema.defines("if"); + !schema.defines("if"); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/unevaluated_items_default.h b/vendor/jsontoolkit/src/jsonschema/rules/unevaluated_items_default.h index 36394f73..78834a50 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/unevaluated_items_default.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/unevaluated_items_default.h @@ -12,12 +12,12 @@ class UnevaluatedItemsDefault final : public SchemaTransformRule { return contains_any( vocabularies, {"https://json-schema.org/draft/2020-12/vocab/unevaluated", - "https://json-schema.org/draft/2019-09/vocab/applicator"}), + "https://json-schema.org/draft/2019-09/vocab/applicator"}) && schema.is_object() && schema.defines("unevaluatedItems") && - ((schema.at("unevaluatedItems").is_boolean() && - schema.at("unevaluatedItems").to_boolean()) || - (schema.at("unevaluatedItems").is_object() && - schema.at("unevaluatedItems").empty())); + ((schema.at("unevaluatedItems").is_boolean() && + schema.at("unevaluatedItems").to_boolean()) || + (schema.at("unevaluatedItems").is_object() && + schema.at("unevaluatedItems").empty())); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/jsonschema/rules/unevaluated_properties_default.h b/vendor/jsontoolkit/src/jsonschema/rules/unevaluated_properties_default.h index e0b3f4b7..66f14a06 100644 --- a/vendor/jsontoolkit/src/jsonschema/rules/unevaluated_properties_default.h +++ b/vendor/jsontoolkit/src/jsonschema/rules/unevaluated_properties_default.h @@ -12,12 +12,12 @@ class UnevaluatedPropertiesDefault final : public SchemaTransformRule { return contains_any( vocabularies, {"https://json-schema.org/draft/2020-12/vocab/unevaluated", - "https://json-schema.org/draft/2019-09/vocab/applicator"}), + "https://json-schema.org/draft/2019-09/vocab/applicator"}) && schema.is_object() && schema.defines("unevaluatedProperties") && - ((schema.at("unevaluatedProperties").is_boolean() && - schema.at("unevaluatedProperties").to_boolean()) || - (schema.at("unevaluatedProperties").is_object() && - schema.at("unevaluatedProperties").empty())); + ((schema.at("unevaluatedProperties").is_boolean() && + schema.at("unevaluatedProperties").to_boolean()) || + (schema.at("unevaluatedProperties").is_object() && + schema.at("unevaluatedProperties").empty())); } auto transform(SchemaTransformer &transformer) const -> void override { diff --git a/vendor/jsontoolkit/src/uri/CMakeLists.txt b/vendor/jsontoolkit/src/uri/CMakeLists.txt index ec6f8aa2..8e0fb9a2 100644 --- a/vendor/jsontoolkit/src/uri/CMakeLists.txt +++ b/vendor/jsontoolkit/src/uri/CMakeLists.txt @@ -9,5 +9,3 @@ endif() target_link_libraries(sourcemeta_jsontoolkit_uri PRIVATE uriparser::uriparser) - -sourcemeta_jsontoolkit_add_compile_options(sourcemeta_jsontoolkit_uri) diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite.mask b/vendor/jsontoolkit/vendor/jsonschema-test-suite.mask index 28c39926..074d13a8 100644 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite.mask +++ b/vendor/jsontoolkit/vendor/jsonschema-test-suite.mask @@ -11,12 +11,10 @@ tests/latest tests/draft-next tests/draft2020-12 tests/draft2019-09 -tests/draft7 tests/draft3 remotes/draft-next remotes/draft2020-12 remotes/draft2019-09 -remotes/draft7 remotes/locationIndependentIdentifier.json remotes/different-id-ref-string.json remotes/name-defs.json diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/LICENSE b/vendor/jsontoolkit/vendor/jsonschema-test-suite/LICENSE deleted file mode 100644 index c28adbad..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Julian Berman - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChange/folderInteger.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChange/folderInteger.json deleted file mode 100644 index 8b50ea30..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChange/folderInteger.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "integer" -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChangeFolder/folderInteger.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChangeFolder/folderInteger.json deleted file mode 100644 index 8b50ea30..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChangeFolder/folderInteger.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "integer" -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChangeFolderInSubschema/folderInteger.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChangeFolderInSubschema/folderInteger.json deleted file mode 100644 index 8b50ea30..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/baseUriChangeFolderInSubschema/folderInteger.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "integer" -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/draft6/detached-ref.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/draft6/detached-ref.json deleted file mode 100644 index 05ce071b..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/draft6/detached-ref.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$id": "http://localhost:1234/draft6/detached-ref.json", - "$schema": "http://json-schema.org/draft-06/schema#", - "definitions": { - "foo": { - "$ref": "#detached" - }, - "detached": { - "$id": "#detached", - "type": "integer" - } - } -} \ No newline at end of file diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/integer.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/integer.json deleted file mode 100644 index 8b50ea30..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/integer.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "integer" -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/locationIndependentIdentifierDraft4.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/locationIndependentIdentifierDraft4.json deleted file mode 100644 index eeff1eb2..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/locationIndependentIdentifierDraft4.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "definitions": { - "refToInteger": { - "$ref": "#foo" - }, - "A": { - "id": "#foo", - "type": "integer" - } - } -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/locationIndependentIdentifierPre2019.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/locationIndependentIdentifierPre2019.json deleted file mode 100644 index e72815cd..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/locationIndependentIdentifierPre2019.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "definitions": { - "refToInteger": { - "$ref": "#foo" - }, - "A": { - "$id": "#foo", - "type": "integer" - } - } -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/name.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/name.json deleted file mode 100644 index fceacb80..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/name.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "definitions": { - "orNull": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#" - } - ] - } - }, - "type": "string" -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/nested/foo-ref-string.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/nested/foo-ref-string.json deleted file mode 100644 index 9cd2527e..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/nested/foo-ref-string.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "object", - "properties": { - "foo": {"$ref": "string.json"} - } -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/nested/string.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/nested/string.json deleted file mode 100644 index c2d48c06..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/nested/string.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "string" -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/ref-and-definitions.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/ref-and-definitions.json deleted file mode 100644 index e0ee802a..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/ref-and-definitions.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$id": "http://localhost:1234/ref-and-definitions.json", - "definitions": { - "inner": { - "properties": { - "bar": { "type": "string" } - } - } - }, - "allOf": [ { "$ref": "#/definitions/inner" } ] -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/subSchemas.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/subSchemas.json deleted file mode 100644 index 6e9b3de3..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/remotes/subSchemas.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "definitions": { - "integer": { - "type": "integer" - }, - "refToInteger": { - "$ref": "#/definitions/integer" - } - } -} diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/additionalItems.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/additionalItems.json deleted file mode 100644 index c9e68154..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/additionalItems.json +++ /dev/null @@ -1,183 +0,0 @@ -[ - { - "description": "additionalItems as schema", - "schema": { - "items": [{}], - "additionalItems": {"type": "integer"} - }, - "tests": [ - { - "description": "additional items match schema", - "data": [ null, 2, 3, 4 ], - "valid": true - }, - { - "description": "additional items do not match schema", - "data": [ null, 2, 3, "foo" ], - "valid": false - } - ] - }, - { - "description": "when items is schema, additionalItems does nothing", - "schema": { - "items": {}, - "additionalItems": false - }, - "tests": [ - { - "description": "all items match schema", - "data": [ 1, 2, 3, 4, 5 ], - "valid": true - } - ] - }, - { - "description": "array of items with no additionalItems permitted", - "schema": { - "items": [{}, {}, {}], - "additionalItems": false - }, - "tests": [ - { - "description": "empty array", - "data": [ ], - "valid": true - }, - { - "description": "fewer number of items present (1)", - "data": [ 1 ], - "valid": true - }, - { - "description": "fewer number of items present (2)", - "data": [ 1, 2 ], - "valid": true - }, - { - "description": "equal number of items present", - "data": [ 1, 2, 3 ], - "valid": true - }, - { - "description": "additional items are not permitted", - "data": [ 1, 2, 3, 4 ], - "valid": false - } - ] - }, - { - "description": "additionalItems as false without items", - "schema": {"additionalItems": false}, - "tests": [ - { - "description": - "items defaults to empty schema so everything is valid", - "data": [ 1, 2, 3, 4, 5 ], - "valid": true - }, - { - "description": "ignores non-arrays", - "data": {"foo" : "bar"}, - "valid": true - } - ] - }, - { - "description": "additionalItems are allowed by default", - "schema": {"items": [{"type": "integer"}]}, - "tests": [ - { - "description": "only the first item is validated", - "data": [1, "foo", false], - "valid": true - } - ] - }, - { - "description": "additionalItems does not look in applicators, valid case", - "schema": { - "allOf": [ - { "items": [ { "type": "integer" } ] } - ], - "additionalItems": { "type": "boolean" } - }, - "tests": [ - { - "description": "items defined in allOf are not examined", - "data": [ 1, null ], - "valid": true - } - ] - }, - { - "description": "additionalItems does not look in applicators, invalid case", - "schema": { - "allOf": [ - { "items": [ { "type": "integer" }, { "type": "string" } ] } - ], - "items": [ {"type": "integer" } ], - "additionalItems": { "type": "boolean" } - }, - "tests": [ - { - "description": "items defined in allOf are not examined", - "data": [ 1, "hello" ], - "valid": false - } - ] - }, - { - "description": "items validation adjusts the starting index for additionalItems", - "schema": { - "items": [ { "type": "string" } ], - "additionalItems": { "type": "integer" } - }, - "tests": [ - { - "description": "valid items", - "data": [ "x", 2, 3 ], - "valid": true - }, - { - "description": "wrong type of second item", - "data": [ "x", "y" ], - "valid": false - } - ] - }, - { - "description": "additionalItems with heterogeneous array", - "schema": { - "items": [{}], - "additionalItems": false - }, - "tests": [ - { - "description": "heterogeneous invalid instance", - "data": [ "foo", "bar", 37 ], - "valid": false - }, - { - "description": "valid instance", - "data": [ null ], - "valid": true - } - ] - }, - { - "description": "additionalItems with null instance elements", - "schema": { - "additionalItems": { - "type": "null" - } - }, - "tests": [ - { - "description": "allows null elements", - "data": [ null ], - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/additionalProperties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/additionalProperties.json deleted file mode 100644 index 0f8e1627..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/additionalProperties.json +++ /dev/null @@ -1,147 +0,0 @@ -[ - { - "description": - "additionalProperties being false does not allow other properties", - "schema": { - "properties": {"foo": {}, "bar": {}}, - "patternProperties": { "^v": {} }, - "additionalProperties": false - }, - "tests": [ - { - "description": "no additional properties is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "an additional property is invalid", - "data": {"foo" : 1, "bar" : 2, "quux" : "boom"}, - "valid": false - }, - { - "description": "ignores arrays", - "data": [1, 2, 3], - "valid": true - }, - { - "description": "ignores strings", - "data": "foobarbaz", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - }, - { - "description": "patternProperties are not additional properties", - "data": {"foo":1, "vroom": 2}, - "valid": true - } - ] - }, - { - "description": "non-ASCII pattern with additionalProperties", - "schema": { - "patternProperties": {"^á": {}}, - "additionalProperties": false - }, - "tests": [ - { - "description": "matching the pattern is valid", - "data": {"ármányos": 2}, - "valid": true - }, - { - "description": "not matching the pattern is invalid", - "data": {"élmény": 2}, - "valid": false - } - ] - }, - { - "description": "additionalProperties with schema", - "schema": { - "properties": {"foo": {}, "bar": {}}, - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "no additional properties is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "an additional valid property is valid", - "data": {"foo" : 1, "bar" : 2, "quux" : true}, - "valid": true - }, - { - "description": "an additional invalid property is invalid", - "data": {"foo" : 1, "bar" : 2, "quux" : 12}, - "valid": false - } - ] - }, - { - "description": - "additionalProperties can exist by itself", - "schema": { - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "an additional valid property is valid", - "data": {"foo" : true}, - "valid": true - }, - { - "description": "an additional invalid property is invalid", - "data": {"foo" : 1}, - "valid": false - } - ] - }, - { - "description": "additionalProperties are allowed by default", - "schema": {"properties": {"foo": {}, "bar": {}}}, - "tests": [ - { - "description": "additional properties are allowed", - "data": {"foo": 1, "bar": 2, "quux": true}, - "valid": true - } - ] - }, - { - "description": "additionalProperties does not look in applicators", - "schema": { - "allOf": [ - {"properties": {"foo": {}}} - ], - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "properties defined in allOf are not examined", - "data": {"foo": 1, "bar": true}, - "valid": false - } - ] - }, - { - "description": "additionalProperties with null valued instance properties", - "schema": { - "additionalProperties": { - "type": "null" - } - }, - "tests": [ - { - "description": "allows null values", - "data": {"foo": null}, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/allOf.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/allOf.json deleted file mode 100644 index fc7dec59..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/allOf.json +++ /dev/null @@ -1,261 +0,0 @@ -[ - { - "description": "allOf", - "schema": { - "allOf": [ - { - "properties": { - "bar": {"type": "integer"} - }, - "required": ["bar"] - }, - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - } - ] - }, - "tests": [ - { - "description": "allOf", - "data": {"foo": "baz", "bar": 2}, - "valid": true - }, - { - "description": "mismatch second", - "data": {"foo": "baz"}, - "valid": false - }, - { - "description": "mismatch first", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "wrong type", - "data": {"foo": "baz", "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "allOf with base schema", - "schema": { - "properties": {"bar": {"type": "integer"}}, - "required": ["bar"], - "allOf" : [ - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - }, - { - "properties": { - "baz": {"type": "null"} - }, - "required": ["baz"] - } - ] - }, - "tests": [ - { - "description": "valid", - "data": {"foo": "quux", "bar": 2, "baz": null}, - "valid": true - }, - { - "description": "mismatch base schema", - "data": {"foo": "quux", "baz": null}, - "valid": false - }, - { - "description": "mismatch first allOf", - "data": {"bar": 2, "baz": null}, - "valid": false - }, - { - "description": "mismatch second allOf", - "data": {"foo": "quux", "bar": 2}, - "valid": false - }, - { - "description": "mismatch both", - "data": {"bar": 2}, - "valid": false - } - ] - }, - { - "description": "allOf simple types", - "schema": { - "allOf": [ - {"maximum": 30}, - {"minimum": 20} - ] - }, - "tests": [ - { - "description": "valid", - "data": 25, - "valid": true - }, - { - "description": "mismatch one", - "data": 35, - "valid": false - } - ] - }, - { - "description": "allOf with one empty schema", - "schema": { - "allOf": [ - {} - ] - }, - "tests": [ - { - "description": "any data is valid", - "data": 1, - "valid": true - } - ] - }, - { - "description": "allOf with two empty schemas", - "schema": { - "allOf": [ - {}, - {} - ] - }, - "tests": [ - { - "description": "any data is valid", - "data": 1, - "valid": true - } - ] - }, - { - "description": "allOf with the first empty schema", - "schema": { - "allOf": [ - {}, - { "type": "number" } - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "allOf with the last empty schema", - "schema": { - "allOf": [ - { "type": "number" }, - {} - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "nested allOf, to check validation semantics", - "schema": { - "allOf": [ - { - "allOf": [ - { - "type": "null" - } - ] - } - ] - }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "anything non-null is invalid", - "data": 123, - "valid": false - } - ] - }, - { - "description": "allOf combined with anyOf, oneOf", - "schema": { - "allOf": [ { "multipleOf": 2 } ], - "anyOf": [ { "multipleOf": 3 } ], - "oneOf": [ { "multipleOf": 5 } ] - }, - "tests": [ - { - "description": "allOf: false, anyOf: false, oneOf: false", - "data": 1, - "valid": false - }, - { - "description": "allOf: false, anyOf: false, oneOf: true", - "data": 5, - "valid": false - }, - { - "description": "allOf: false, anyOf: true, oneOf: false", - "data": 3, - "valid": false - }, - { - "description": "allOf: false, anyOf: true, oneOf: true", - "data": 15, - "valid": false - }, - { - "description": "allOf: true, anyOf: false, oneOf: false", - "data": 2, - "valid": false - }, - { - "description": "allOf: true, anyOf: false, oneOf: true", - "data": 10, - "valid": false - }, - { - "description": "allOf: true, anyOf: true, oneOf: false", - "data": 6, - "valid": false - }, - { - "description": "allOf: true, anyOf: true, oneOf: true", - "data": 30, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/anyOf.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/anyOf.json deleted file mode 100644 index 09cc3c2f..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/anyOf.json +++ /dev/null @@ -1,156 +0,0 @@ -[ - { - "description": "anyOf", - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] - }, - "tests": [ - { - "description": "first anyOf valid", - "data": 1, - "valid": true - }, - { - "description": "second anyOf valid", - "data": 2.5, - "valid": true - }, - { - "description": "both anyOf valid", - "data": 3, - "valid": true - }, - { - "description": "neither anyOf valid", - "data": 1.5, - "valid": false - } - ] - }, - { - "description": "anyOf with base schema", - "schema": { - "type": "string", - "anyOf" : [ - { - "maxLength": 2 - }, - { - "minLength": 4 - } - ] - }, - "tests": [ - { - "description": "mismatch base schema", - "data": 3, - "valid": false - }, - { - "description": "one anyOf valid", - "data": "foobar", - "valid": true - }, - { - "description": "both anyOf invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "anyOf complex types", - "schema": { - "anyOf": [ - { - "properties": { - "bar": {"type": "integer"} - }, - "required": ["bar"] - }, - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - } - ] - }, - "tests": [ - { - "description": "first anyOf valid (complex)", - "data": {"bar": 2}, - "valid": true - }, - { - "description": "second anyOf valid (complex)", - "data": {"foo": "baz"}, - "valid": true - }, - { - "description": "both anyOf valid (complex)", - "data": {"foo": "baz", "bar": 2}, - "valid": true - }, - { - "description": "neither anyOf valid (complex)", - "data": {"foo": 2, "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "anyOf with one empty schema", - "schema": { - "anyOf": [ - { "type": "number" }, - {} - ] - }, - "tests": [ - { - "description": "string is valid", - "data": "foo", - "valid": true - }, - { - "description": "number is valid", - "data": 123, - "valid": true - } - ] - }, - { - "description": "nested anyOf, to check validation semantics", - "schema": { - "anyOf": [ - { - "anyOf": [ - { - "type": "null" - } - ] - } - ] - }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "anything non-null is invalid", - "data": 123, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/default.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/default.json deleted file mode 100644 index 289a9b66..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/default.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "description": "invalid type for default", - "schema": { - "properties": { - "foo": { - "type": "integer", - "default": [] - } - } - }, - "tests": [ - { - "description": "valid when property is specified", - "data": {"foo": 13}, - "valid": true - }, - { - "description": "still valid when the invalid default is used", - "data": {}, - "valid": true - } - ] - }, - { - "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 - }, - { - "description": "still valid when the invalid default is used", - "data": {}, - "valid": true - } - ] - }, - { - "description": "the default keyword does not do anything if the property is missing", - "schema": { - "type": "object", - "properties": { - "alpha": { - "type": "number", - "maximum": 3, - "default": 5 - } - } - }, - "tests": [ - { - "description": "an explicit property value is checked against maximum (passing)", - "data": { "alpha": 1 }, - "valid": true - }, - { - "description": "an explicit property value is checked against maximum (failing)", - "data": { "alpha": 5 }, - "valid": false - }, - { - "description": "missing properties are not filled in with the default", - "data": {}, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/definitions.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/definitions.json deleted file mode 100644 index 482823be..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/definitions.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "description": "validate definition against metaschema", - "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, - "tests": [ - { - "description": "valid definition schema", - "data": { - "definitions": { - "foo": {"type": "integer"} - } - }, - "valid": true - }, - { - "description": "invalid definition schema", - "data": { - "definitions": { - "foo": {"type": 1} - } - }, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/dependencies.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/dependencies.json deleted file mode 100644 index 9045ddc2..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/dependencies.json +++ /dev/null @@ -1,232 +0,0 @@ -[ - { - "description": "dependencies", - "schema": { - "dependencies": {"bar": ["foo"]} - }, - "tests": [ - { - "description": "neither", - "data": {}, - "valid": true - }, - { - "description": "nondependant", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "with dependency", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "missing dependency", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "ignores arrays", - "data": ["bar"], - "valid": true - }, - { - "description": "ignores strings", - "data": "foobar", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "multiple dependencies", - "schema": { - "dependencies": {"quux": ["foo", "bar"]} - }, - "tests": [ - { - "description": "neither", - "data": {}, - "valid": true - }, - { - "description": "nondependants", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "with dependencies", - "data": {"foo": 1, "bar": 2, "quux": 3}, - "valid": true - }, - { - "description": "missing dependency", - "data": {"foo": 1, "quux": 2}, - "valid": false - }, - { - "description": "missing other dependency", - "data": {"bar": 1, "quux": 2}, - "valid": false - }, - { - "description": "missing both dependencies", - "data": {"quux": 1}, - "valid": false - } - ] - }, - { - "description": "multiple dependencies subschema", - "schema": { - "dependencies": { - "bar": { - "properties": { - "foo": {"type": "integer"}, - "bar": {"type": "integer"} - } - } - } - }, - "tests": [ - { - "description": "valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "no dependency", - "data": {"foo": "quux"}, - "valid": true - }, - { - "description": "wrong type", - "data": {"foo": "quux", "bar": 2}, - "valid": false - }, - { - "description": "wrong type other", - "data": {"foo": 2, "bar": "quux"}, - "valid": false - }, - { - "description": "wrong type both", - "data": {"foo": "quux", "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "dependencies with escaped characters", - "schema": { - "dependencies": { - "foo\nbar": ["foo\rbar"], - "foo\tbar": { - "minProperties": 4 - }, - "foo'bar": {"required": ["foo\"bar"]}, - "foo\"bar": ["foo'bar"] - } - }, - "tests": [ - { - "description": "valid object 1", - "data": { - "foo\nbar": 1, - "foo\rbar": 2 - }, - "valid": true - }, - { - "description": "valid object 2", - "data": { - "foo\tbar": 1, - "a": 2, - "b": 3, - "c": 4 - }, - "valid": true - }, - { - "description": "valid object 3", - "data": { - "foo'bar": 1, - "foo\"bar": 2 - }, - "valid": true - }, - { - "description": "invalid object 1", - "data": { - "foo\nbar": 1, - "foo": 2 - }, - "valid": false - }, - { - "description": "invalid object 2", - "data": { - "foo\tbar": 1, - "a": 2 - }, - "valid": false - }, - { - "description": "invalid object 3", - "data": { - "foo'bar": 1 - }, - "valid": false - }, - { - "description": "invalid object 4", - "data": { - "foo\"bar": 2 - }, - "valid": false - } - ] - }, - { - "description": "dependent subschema incompatible with root", - "schema": { - "properties": { - "foo": {} - }, - "dependencies": { - "foo": { - "properties": { - "bar": {} - }, - "additionalProperties": false - } - } - }, - "tests": [ - { - "description": "matches root", - "data": {"foo": 1}, - "valid": false - }, - { - "description": "matches dependency", - "data": {"bar": 1}, - "valid": true - }, - { - "description": "matches both", - "data": {"foo": 1, "bar": 2}, - "valid": false - }, - { - "description": "no dependency", - "data": {"baz": 1}, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/enum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/enum.json deleted file mode 100644 index ce43acc0..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/enum.json +++ /dev/null @@ -1,320 +0,0 @@ -[ - { - "description": "simple enum validation", - "schema": {"enum": [1, 2, 3]}, - "tests": [ - { - "description": "one of the enum is valid", - "data": 1, - "valid": true - }, - { - "description": "something else is invalid", - "data": 4, - "valid": false - } - ] - }, - { - "description": "heterogeneous enum validation", - "schema": {"enum": [6, "foo", [], true, {"foo": 12}]}, - "tests": [ - { - "description": "one of the enum is valid", - "data": [], - "valid": true - }, - { - "description": "something else is invalid", - "data": null, - "valid": false - }, - { - "description": "objects are deep compared", - "data": {"foo": false}, - "valid": false - }, - { - "description": "valid object matches", - "data": {"foo": 12}, - "valid": true - }, - { - "description": "extra properties in object is invalid", - "data": {"foo": 12, "boo": 42}, - "valid": false - } - ] - }, - { - "description": "heterogeneous enum-with-null validation", - "schema": { "enum": [6, null] }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "number is valid", - "data": 6, - "valid": true - }, - { - "description": "something else is invalid", - "data": "test", - "valid": false - } - ] - }, - { - "description": "enums in properties", - "schema": { - "type":"object", - "properties": { - "foo": {"enum":["foo"]}, - "bar": {"enum":["bar"]} - }, - "required": ["bar"] - }, - "tests": [ - { - "description": "both properties are valid", - "data": {"foo":"foo", "bar":"bar"}, - "valid": true - }, - { - "description": "wrong foo value", - "data": {"foo":"foot", "bar":"bar"}, - "valid": false - }, - { - "description": "wrong bar value", - "data": {"foo":"foo", "bar":"bart"}, - "valid": false - }, - { - "description": "missing optional property is valid", - "data": {"bar":"bar"}, - "valid": true - }, - { - "description": "missing required property is invalid", - "data": {"foo":"foo"}, - "valid": false - }, - { - "description": "missing all properties is invalid", - "data": {}, - "valid": false - } - ] - }, - { - "description": "enum with escaped characters", - "schema": { - "enum": ["foo\nbar", "foo\rbar"] - }, - "tests": [ - { - "description": "member 1 is valid", - "data": "foo\nbar", - "valid": true - }, - { - "description": "member 2 is valid", - "data": "foo\rbar", - "valid": true - }, - { - "description": "another string is invalid", - "data": "abc", - "valid": false - } - ] - }, - { - "description": "enum with false does not match 0", - "schema": {"enum": [false]}, - "tests": [ - { - "description": "false is valid", - "data": false, - "valid": true - }, - { - "description": "integer zero is invalid", - "data": 0, - "valid": false - }, - { - "description": "float zero is invalid", - "data": 0.0, - "valid": false - } - ] - }, - { - "description": "enum with [false] does not match [0]", - "schema": {"enum": [[false]]}, - "tests": [ - { - "description": "[false] is valid", - "data": [false], - "valid": true - }, - { - "description": "[0] is invalid", - "data": [0], - "valid": false - }, - { - "description": "[0.0] is invalid", - "data": [0.0], - "valid": false - } - ] - }, - { - "description": "enum with true does not match 1", - "schema": {"enum": [true]}, - "tests": [ - { - "description": "true is valid", - "data": true, - "valid": true - }, - { - "description": "integer one is invalid", - "data": 1, - "valid": false - }, - { - "description": "float one is invalid", - "data": 1.0, - "valid": false - } - ] - }, - { - "description": "enum with [true] does not match [1]", - "schema": {"enum": [[true]]}, - "tests": [ - { - "description": "[true] is valid", - "data": [true], - "valid": true - }, - { - "description": "[1] is invalid", - "data": [1], - "valid": false - }, - { - "description": "[1.0] is invalid", - "data": [1.0], - "valid": false - } - ] - }, - { - "description": "enum with 0 does not match false", - "schema": {"enum": [0]}, - "tests": [ - { - "description": "false is invalid", - "data": false, - "valid": false - }, - { - "description": "integer zero is valid", - "data": 0, - "valid": true - }, - { - "description": "float zero is valid", - "data": 0.0, - "valid": true - } - ] - }, - { - "description": "enum with [0] does not match [false]", - "schema": {"enum": [[0]]}, - "tests": [ - { - "description": "[false] is invalid", - "data": [false], - "valid": false - }, - { - "description": "[0] is valid", - "data": [0], - "valid": true - }, - { - "description": "[0.0] is valid", - "data": [0.0], - "valid": true - } - ] - }, - { - "description": "enum with 1 does not match true", - "schema": {"enum": [1]}, - "tests": [ - { - "description": "true is invalid", - "data": true, - "valid": false - }, - { - "description": "integer one is valid", - "data": 1, - "valid": true - }, - { - "description": "float one is valid", - "data": 1.0, - "valid": true - } - ] - }, - { - "description": "enum with [1] does not match [true]", - "schema": {"enum": [[1]]}, - "tests": [ - { - "description": "[true] is invalid", - "data": [true], - "valid": false - }, - { - "description": "[1] is valid", - "data": [1], - "valid": true - }, - { - "description": "[1.0] is valid", - "data": [1.0], - "valid": true - } - ] - }, - { - "description": "nul characters in strings", - "schema": { "enum": [ "hello\u0000there" ] }, - "tests": [ - { - "description": "match string with nul", - "data": "hello\u0000there", - "valid": true - }, - { - "description": "do not match string lacking nul", - "data": "hellothere", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/format.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/format.json deleted file mode 100644 index 5bd83cc6..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/format.json +++ /dev/null @@ -1,218 +0,0 @@ -[ - { - "description": "email format", - "schema": { "format": "email" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "ipv4 format", - "schema": { "format": "ipv4" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "ipv6 format", - "schema": { "format": "ipv6" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "hostname format", - "schema": { "format": "hostname" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "date-time format", - "schema": { "format": "date-time" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "uri format", - "schema": { "format": "uri" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/infinite-loop-detection.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/infinite-loop-detection.json deleted file mode 100644 index f98c74fc..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/infinite-loop-detection.json +++ /dev/null @@ -1,36 +0,0 @@ -[ - { - "description": "evaluating the same schema location against the same data location twice is not a sign of an infinite loop", - "schema": { - "definitions": { - "int": { "type": "integer" } - }, - "allOf": [ - { - "properties": { - "foo": { - "$ref": "#/definitions/int" - } - } - }, - { - "additionalProperties": { - "$ref": "#/definitions/int" - } - } - ] - }, - "tests": [ - { - "description": "passing case", - "data": { "foo": 1 }, - "valid": true - }, - { - "description": "failing case", - "data": { "foo": "a string" }, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/items.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/items.json deleted file mode 100644 index 16ea0704..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/items.json +++ /dev/null @@ -1,227 +0,0 @@ -[ - { - "description": "a schema given for items", - "schema": { - "items": {"type": "integer"} - }, - "tests": [ - { - "description": "valid items", - "data": [ 1, 2, 3 ], - "valid": true - }, - { - "description": "wrong type of items", - "data": [1, "x"], - "valid": false - }, - { - "description": "ignores non-arrays", - "data": {"foo" : "bar"}, - "valid": true - }, - { - "description": "JavaScript pseudo-array is valid", - "data": { - "0": "invalid", - "length": 1 - }, - "valid": true - } - ] - }, - { - "description": "an array of schemas for items", - "schema": { - "items": [ - {"type": "integer"}, - {"type": "string"} - ] - }, - "tests": [ - { - "description": "correct types", - "data": [ 1, "foo" ], - "valid": true - }, - { - "description": "wrong types", - "data": [ "foo", 1 ], - "valid": false - }, - { - "description": "incomplete array of items", - "data": [ 1 ], - "valid": true - }, - { - "description": "array with additional items", - "data": [ 1, "foo", true ], - "valid": true - }, - { - "description": "empty array", - "data": [ ], - "valid": true - }, - { - "description": "JavaScript pseudo-array is valid", - "data": { - "0": "invalid", - "1": "valid", - "length": 2 - }, - "valid": true - } - ] - }, - { - "description": "items and subitems", - "schema": { - "definitions": { - "item": { - "type": "array", - "additionalItems": false, - "items": [ - { "$ref": "#/definitions/sub-item" }, - { "$ref": "#/definitions/sub-item" } - ] - }, - "sub-item": { - "type": "object", - "required": ["foo"] - } - }, - "type": "array", - "additionalItems": false, - "items": [ - { "$ref": "#/definitions/item" }, - { "$ref": "#/definitions/item" }, - { "$ref": "#/definitions/item" } - ] - }, - "tests": [ - { - "description": "valid items", - "data": [ - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": true - }, - { - "description": "too many items", - "data": [ - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": false - }, - { - "description": "too many sub-items", - "data": [ - [ {"foo": null}, {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": false - }, - { - "description": "wrong item", - "data": [ - {"foo": null}, - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": false - }, - { - "description": "wrong sub-item", - "data": [ - [ {}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": false - }, - { - "description": "fewer items is valid", - "data": [ - [ {"foo": null} ], - [ {"foo": null} ] - ], - "valid": true - } - ] - }, - { - "description": "nested items", - "schema": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "tests": [ - { - "description": "valid nested array", - "data": [[[[1]], [[2],[3]]], [[[4], [5], [6]]]], - "valid": true - }, - { - "description": "nested array with invalid type", - "data": [[[["1"]], [[2],[3]]], [[[4], [5], [6]]]], - "valid": false - }, - { - "description": "not deep enough", - "data": [[[1], [2],[3]], [[4], [5], [6]]], - "valid": false - } - ] - }, - { - "description": "items with null instance elements", - "schema": { - "items": { - "type": "null" - } - }, - "tests": [ - { - "description": "allows null elements", - "data": [ null ], - "valid": true - } - ] - }, - { - "description": "array-form items with null instance elements", - "schema": { - "items": [ - { - "type": "null" - } - ] - }, - "tests": [ - { - "description": "allows null elements", - "data": [ null ], - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxItems.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxItems.json deleted file mode 100644 index 3b53a6b3..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxItems.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "maxItems validation", - "schema": {"maxItems": 2}, - "tests": [ - { - "description": "shorter is valid", - "data": [1], - "valid": true - }, - { - "description": "exact length is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "too long is invalid", - "data": [1, 2, 3], - "valid": false - }, - { - "description": "ignores non-arrays", - "data": "foobar", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxLength.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxLength.json deleted file mode 100644 index 33879594..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxLength.json +++ /dev/null @@ -1,33 +0,0 @@ -[ - { - "description": "maxLength validation", - "schema": {"maxLength": 2}, - "tests": [ - { - "description": "shorter is valid", - "data": "f", - "valid": true - }, - { - "description": "exact length is valid", - "data": "fo", - "valid": true - }, - { - "description": "too long is invalid", - "data": "foo", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 100, - "valid": true - }, - { - "description": "two graphemes is long enough", - "data": "\uD83D\uDCA9\uD83D\uDCA9", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxProperties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxProperties.json deleted file mode 100644 index aa7209f5..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maxProperties.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "description": "maxProperties validation", - "schema": {"maxProperties": 2}, - "tests": [ - { - "description": "shorter is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "exact length is valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "too long is invalid", - "data": {"foo": 1, "bar": 2, "baz": 3}, - "valid": false - }, - { - "description": "ignores arrays", - "data": [1, 2, 3], - "valid": true - }, - { - "description": "ignores strings", - "data": "foobar", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "maxProperties = 0 means the object is empty", - "schema": { "maxProperties": 0 }, - "tests": [ - { - "description": "no properties is valid", - "data": {}, - "valid": true - }, - { - "description": "one property is invalid", - "data": { "foo": 1 }, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maximum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maximum.json deleted file mode 100644 index ccb79c6c..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/maximum.json +++ /dev/null @@ -1,99 +0,0 @@ -[ - { - "description": "maximum validation", - "schema": {"maximum": 3.0}, - "tests": [ - { - "description": "below the maximum is valid", - "data": 2.6, - "valid": true - }, - { - "description": "boundary point is valid", - "data": 3.0, - "valid": true - }, - { - "description": "above the maximum is invalid", - "data": 3.5, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - }, - { - "description": "maximum validation with unsigned integer", - "schema": {"maximum": 300}, - "tests": [ - { - "description": "below the maximum is invalid", - "data": 299.97, - "valid": true - }, - { - "description": "boundary point integer is valid", - "data": 300, - "valid": true - }, - { - "description": "boundary point float is valid", - "data": 300.00, - "valid": true - }, - { - "description": "above the maximum is invalid", - "data": 300.5, - "valid": false - } - ] - }, - { - "description": "maximum validation (explicit false exclusivity)", - "schema": {"maximum": 3.0, "exclusiveMaximum": false}, - "tests": [ - { - "description": "below the maximum is valid", - "data": 2.6, - "valid": true - }, - { - "description": "boundary point is valid", - "data": 3.0, - "valid": true - }, - { - "description": "above the maximum is invalid", - "data": 3.5, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - }, - { - "description": "exclusiveMaximum validation", - "schema": { - "maximum": 3.0, - "exclusiveMaximum": true - }, - "tests": [ - { - "description": "below the maximum is still valid", - "data": 2.2, - "valid": true - }, - { - "description": "boundary point is invalid", - "data": 3.0, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minItems.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minItems.json deleted file mode 100644 index ed511881..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minItems.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "minItems validation", - "schema": {"minItems": 1}, - "tests": [ - { - "description": "longer is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "exact length is valid", - "data": [1], - "valid": true - }, - { - "description": "too short is invalid", - "data": [], - "valid": false - }, - { - "description": "ignores non-arrays", - "data": "", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minLength.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minLength.json deleted file mode 100644 index 6652c750..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minLength.json +++ /dev/null @@ -1,33 +0,0 @@ -[ - { - "description": "minLength validation", - "schema": {"minLength": 2}, - "tests": [ - { - "description": "longer is valid", - "data": "foo", - "valid": true - }, - { - "description": "exact length is valid", - "data": "fo", - "valid": true - }, - { - "description": "too short is invalid", - "data": "f", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 1, - "valid": true - }, - { - "description": "one grapheme is not long enough", - "data": "\uD83D\uDCA9", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minProperties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minProperties.json deleted file mode 100644 index 49a0726e..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minProperties.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "description": "minProperties validation", - "schema": {"minProperties": 1}, - "tests": [ - { - "description": "longer is valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "exact length is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "too short is invalid", - "data": {}, - "valid": false - }, - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores strings", - "data": "", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minimum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minimum.json deleted file mode 100644 index 22d310e1..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/minimum.json +++ /dev/null @@ -1,114 +0,0 @@ -[ - { - "description": "minimum validation", - "schema": {"minimum": 1.1}, - "tests": [ - { - "description": "above the minimum is valid", - "data": 2.6, - "valid": true - }, - { - "description": "boundary point is valid", - "data": 1.1, - "valid": true - }, - { - "description": "below the minimum is invalid", - "data": 0.6, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - }, - { - "description": "minimum validation (explicit false exclusivity)", - "schema": {"minimum": 1.1, "exclusiveMinimum": false}, - "tests": [ - { - "description": "above the minimum is valid", - "data": 2.6, - "valid": true - }, - { - "description": "boundary point is valid", - "data": 1.1, - "valid": true - }, - { - "description": "below the minimum is invalid", - "data": 0.6, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - }, - { - "description": "exclusiveMinimum validation", - "schema": { - "minimum": 1.1, - "exclusiveMinimum": true - }, - "tests": [ - { - "description": "above the minimum is still valid", - "data": 1.2, - "valid": true - }, - { - "description": "boundary point is invalid", - "data": 1.1, - "valid": false - } - ] - }, - { - "description": "minimum validation with signed integer", - "schema": {"minimum": -2}, - "tests": [ - { - "description": "negative above the minimum is valid", - "data": -1, - "valid": true - }, - { - "description": "positive above the minimum is valid", - "data": 0, - "valid": true - }, - { - "description": "boundary point is valid", - "data": -2, - "valid": true - }, - { - "description": "boundary point with float is valid", - "data": -2.0, - "valid": true - }, - { - "description": "float below the minimum is invalid", - "data": -2.0001, - "valid": false - }, - { - "description": "int below the minimum is invalid", - "data": -3, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/multipleOf.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/multipleOf.json deleted file mode 100644 index ed2df4a7..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/multipleOf.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "description": "by int", - "schema": {"multipleOf": 2}, - "tests": [ - { - "description": "int by int", - "data": 10, - "valid": true - }, - { - "description": "int by int fail", - "data": 7, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "by number", - "schema": {"multipleOf": 1.5}, - "tests": [ - { - "description": "zero is multiple of anything", - "data": 0, - "valid": true - }, - { - "description": "4.5 is multiple of 1.5", - "data": 4.5, - "valid": true - }, - { - "description": "35 is not multiple of 1.5", - "data": 35, - "valid": false - } - ] - }, - { - "description": "by small number", - "schema": {"multipleOf": 0.0001}, - "tests": [ - { - "description": "0.0075 is multiple of 0.0001", - "data": 0.0075, - "valid": true - }, - { - "description": "0.00751 is not multiple of 0.0001", - "data": 0.00751, - "valid": false - } - ] - }, - { - "description": "float division = inf", - "schema": {"type": "integer", "multipleOf": 0.123456789}, - "tests": [ - { - "description": "invalid, but naive implementations may raise an overflow error", - "data": 1e308, - "valid": false - } - ] - }, - { - "description": "small multiple of large integer", - "schema": {"type": "integer", "multipleOf": 1e-8}, - "tests": [ - { - "description": "any integer is a multiple of 1e-8", - "data": 12391239123, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/not.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/not.json deleted file mode 100644 index 525219cf..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/not.json +++ /dev/null @@ -1,157 +0,0 @@ -[ - { - "description": "not", - "schema": { - "not": {"type": "integer"} - }, - "tests": [ - { - "description": "allowed", - "data": "foo", - "valid": true - }, - { - "description": "disallowed", - "data": 1, - "valid": false - } - ] - }, - { - "description": "not multiple types", - "schema": { - "not": {"type": ["integer", "boolean"]} - }, - "tests": [ - { - "description": "valid", - "data": "foo", - "valid": true - }, - { - "description": "mismatch", - "data": 1, - "valid": false - }, - { - "description": "other mismatch", - "data": true, - "valid": false - } - ] - }, - { - "description": "not more complex schema", - "schema": { - "not": { - "type": "object", - "properties": { - "foo": { - "type": "string" - } - } - } - }, - "tests": [ - { - "description": "match", - "data": 1, - "valid": true - }, - { - "description": "other match", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "mismatch", - "data": {"foo": "bar"}, - "valid": false - } - ] - }, - { - "description": "forbidden property", - "schema": { - "properties": { - "foo": { - "not": {} - } - } - }, - "tests": [ - { - "description": "property present", - "data": {"foo": 1, "bar": 2}, - "valid": false - }, - { - "description": "property absent", - "data": {"bar": 1, "baz": 2}, - "valid": true - } - ] - }, - { - "description": "forbid everything with empty schema", - "schema": { "not": {} }, - "tests": [ - { - "description": "number is invalid", - "data": 1, - "valid": false - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - }, - { - "description": "boolean true is invalid", - "data": true, - "valid": false - }, - { - "description": "boolean false is invalid", - "data": false, - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - }, - { - "description": "object is invalid", - "data": {"foo": "bar"}, - "valid": false - }, - { - "description": "empty object is invalid", - "data": {}, - "valid": false - }, - { - "description": "array is invalid", - "data": ["foo"], - "valid": false - }, - { - "description": "empty array is invalid", - "data": [], - "valid": false - } - ] - }, - { - "description": "double negation", - "schema": { "not": { "not": {} } }, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/oneOf.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/oneOf.json deleted file mode 100644 index 2487f0e3..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/oneOf.json +++ /dev/null @@ -1,230 +0,0 @@ -[ - { - "description": "oneOf", - "schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] - }, - "tests": [ - { - "description": "first oneOf valid", - "data": 1, - "valid": true - }, - { - "description": "second oneOf valid", - "data": 2.5, - "valid": true - }, - { - "description": "both oneOf valid", - "data": 3, - "valid": false - }, - { - "description": "neither oneOf valid", - "data": 1.5, - "valid": false - } - ] - }, - { - "description": "oneOf with base schema", - "schema": { - "type": "string", - "oneOf" : [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] - }, - "tests": [ - { - "description": "mismatch base schema", - "data": 3, - "valid": false - }, - { - "description": "one oneOf valid", - "data": "foobar", - "valid": true - }, - { - "description": "both oneOf valid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "oneOf complex types", - "schema": { - "oneOf": [ - { - "properties": { - "bar": {"type": "integer"} - }, - "required": ["bar"] - }, - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - } - ] - }, - "tests": [ - { - "description": "first oneOf valid (complex)", - "data": {"bar": 2}, - "valid": true - }, - { - "description": "second oneOf valid (complex)", - "data": {"foo": "baz"}, - "valid": true - }, - { - "description": "both oneOf valid (complex)", - "data": {"foo": "baz", "bar": 2}, - "valid": false - }, - { - "description": "neither oneOf valid (complex)", - "data": {"foo": 2, "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "oneOf with empty schema", - "schema": { - "oneOf": [ - { "type": "number" }, - {} - ] - }, - "tests": [ - { - "description": "one valid - valid", - "data": "foo", - "valid": true - }, - { - "description": "both valid - invalid", - "data": 123, - "valid": false - } - ] - }, - { - "description": "oneOf with required", - "schema": { - "type": "object", - "oneOf": [ - { "required": ["foo", "bar"] }, - { "required": ["foo", "baz"] } - ] - }, - "tests": [ - { - "description": "both invalid - invalid", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "first valid - valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "second valid - valid", - "data": {"foo": 1, "baz": 3}, - "valid": true - }, - { - "description": "both valid - invalid", - "data": {"foo": 1, "bar": 2, "baz" : 3}, - "valid": false - } - ] - }, - { - "description": "oneOf with missing optional property", - "schema": { - "oneOf": [ - { - "properties": { - "bar": {}, - "baz": {} - }, - "required": ["bar"] - }, - { - "properties": { - "foo": {} - }, - "required": ["foo"] - } - ] - }, - "tests": [ - { - "description": "first oneOf valid", - "data": {"bar": 8}, - "valid": true - }, - { - "description": "second oneOf valid", - "data": {"foo": "foo"}, - "valid": true - }, - { - "description": "both oneOf valid", - "data": {"foo": "foo", "bar": 8}, - "valid": false - }, - { - "description": "neither oneOf valid", - "data": {"baz": "quux"}, - "valid": false - } - ] - }, - { - "description": "nested oneOf, to check validation semantics", - "schema": { - "oneOf": [ - { - "oneOf": [ - { - "type": "null" - } - ] - } - ] - }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "anything non-null is invalid", - "data": 123, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/bignum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/bignum.json deleted file mode 100644 index 1bc8eb21..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/bignum.json +++ /dev/null @@ -1,95 +0,0 @@ -[ - { - "description": "integer", - "schema": { "type": "integer" }, - "tests": [ - { - "description": "a bignum is an integer", - "data": 12345678910111213141516171819202122232425262728293031, - "valid": true - }, - { - "description": "a negative bignum is an integer", - "data": -12345678910111213141516171819202122232425262728293031, - "valid": true - } - ] - }, - { - "description": "number", - "schema": { "type": "number" }, - "tests": [ - { - "description": "a bignum is a number", - "data": 98249283749234923498293171823948729348710298301928331, - "valid": true - }, - { - "description": "a negative bignum is a number", - "data": -98249283749234923498293171823948729348710298301928331, - "valid": true - } - ] - }, - { - "description": "string", - "schema": { "type": "string" }, - "tests": [ - { - "description": "a bignum is not a string", - "data": 98249283749234923498293171823948729348710298301928331, - "valid": false - } - ] - }, - { - "description": "maximum integer comparison", - "schema": { "maximum": 18446744073709551615 }, - "tests": [ - { - "description": "comparison works for high numbers", - "data": 18446744073709551600, - "valid": true - } - ] - }, - { - "description": "float comparison with high precision", - "schema": { - "maximum": 972783798187987123879878123.18878137, - "exclusiveMaximum": true - }, - "tests": [ - { - "description": "comparison works for high numbers", - "data": 972783798187987123879878123.188781371, - "valid": false - } - ] - }, - { - "description": "minimum integer comparison", - "schema": { "minimum": -18446744073709551615 }, - "tests": [ - { - "description": "comparison works for very negative numbers", - "data": -18446744073709551600, - "valid": true - } - ] - }, - { - "description": "float comparison with high precision on negative numbers", - "schema": { - "minimum": -972783798187987123879878123.18878137, - "exclusiveMinimum": true - }, - "tests": [ - { - "description": "comparison works for very negative numbers", - "data": -972783798187987123879878123.188781371, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/ecmascript-regex.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/ecmascript-regex.json deleted file mode 100644 index c431baca..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/ecmascript-regex.json +++ /dev/null @@ -1,552 +0,0 @@ -[ - { - "description": "ECMA 262 regex $ does not match trailing newline", - "schema": { - "type": "string", - "pattern": "^abc$" - }, - "tests": [ - { - "description": "matches in Python, but not in ECMA 262", - "data": "abc\\n", - "valid": false - }, - { - "description": "matches", - "data": "abc", - "valid": true - } - ] - }, - { - "description": "ECMA 262 regex converts \\t to horizontal tab", - "schema": { - "type": "string", - "pattern": "^\\t$" - }, - "tests": [ - { - "description": "does not match", - "data": "\\t", - "valid": false - }, - { - "description": "matches", - "data": "\u0009", - "valid": true - } - ] - }, - { - "description": "ECMA 262 regex escapes control codes with \\c and upper letter", - "schema": { - "type": "string", - "pattern": "^\\cC$" - }, - "tests": [ - { - "description": "does not match", - "data": "\\cC", - "valid": false - }, - { - "description": "matches", - "data": "\u0003", - "valid": true - } - ] - }, - { - "description": "ECMA 262 regex escapes control codes with \\c and lower letter", - "schema": { - "type": "string", - "pattern": "^\\cc$" - }, - "tests": [ - { - "description": "does not match", - "data": "\\cc", - "valid": false - }, - { - "description": "matches", - "data": "\u0003", - "valid": true - } - ] - }, - { - "description": "ECMA 262 \\d matches ascii digits only", - "schema": { - "type": "string", - "pattern": "^\\d$" - }, - "tests": [ - { - "description": "ASCII zero matches", - "data": "0", - "valid": true - }, - { - "description": "NKO DIGIT ZERO does not match (unlike e.g. Python)", - "data": "߀", - "valid": false - }, - { - "description": "NKO DIGIT ZERO (as \\u escape) does not match", - "data": "\u07c0", - "valid": false - } - ] - }, - { - "description": "ECMA 262 \\D matches everything but ascii digits", - "schema": { - "type": "string", - "pattern": "^\\D$" - }, - "tests": [ - { - "description": "ASCII zero does not match", - "data": "0", - "valid": false - }, - { - "description": "NKO DIGIT ZERO matches (unlike e.g. Python)", - "data": "߀", - "valid": true - }, - { - "description": "NKO DIGIT ZERO (as \\u escape) matches", - "data": "\u07c0", - "valid": true - } - ] - }, - { - "description": "ECMA 262 \\w matches ascii letters only", - "schema": { - "type": "string", - "pattern": "^\\w$" - }, - "tests": [ - { - "description": "ASCII 'a' matches", - "data": "a", - "valid": true - }, - { - "description": "latin-1 e-acute does not match (unlike e.g. Python)", - "data": "é", - "valid": false - } - ] - }, - { - "description": "ECMA 262 \\W matches everything but ascii letters", - "schema": { - "type": "string", - "pattern": "^\\W$" - }, - "tests": [ - { - "description": "ASCII 'a' does not match", - "data": "a", - "valid": false - }, - { - "description": "latin-1 e-acute matches (unlike e.g. Python)", - "data": "é", - "valid": true - } - ] - }, - { - "description": "ECMA 262 \\s matches whitespace", - "schema": { - "type": "string", - "pattern": "^\\s$" - }, - "tests": [ - { - "description": "ASCII space matches", - "data": " ", - "valid": true - }, - { - "description": "Character tabulation matches", - "data": "\t", - "valid": true - }, - { - "description": "Line tabulation matches", - "data": "\u000b", - "valid": true - }, - { - "description": "Form feed matches", - "data": "\u000c", - "valid": true - }, - { - "description": "latin-1 non-breaking-space matches", - "data": "\u00a0", - "valid": true - }, - { - "description": "zero-width whitespace matches", - "data": "\ufeff", - "valid": true - }, - { - "description": "line feed matches (line terminator)", - "data": "\u000a", - "valid": true - }, - { - "description": "paragraph separator matches (line terminator)", - "data": "\u2029", - "valid": true - }, - { - "description": "EM SPACE matches (Space_Separator)", - "data": "\u2003", - "valid": true - }, - { - "description": "Non-whitespace control does not match", - "data": "\u0001", - "valid": false - }, - { - "description": "Non-whitespace does not match", - "data": "\u2013", - "valid": false - } - ] - }, - { - "description": "ECMA 262 \\S matches everything but whitespace", - "schema": { - "type": "string", - "pattern": "^\\S$" - }, - "tests": [ - { - "description": "ASCII space does not match", - "data": " ", - "valid": false - }, - { - "description": "Character tabulation does not match", - "data": "\t", - "valid": false - }, - { - "description": "Line tabulation does not match", - "data": "\u000b", - "valid": false - }, - { - "description": "Form feed does not match", - "data": "\u000c", - "valid": false - }, - { - "description": "latin-1 non-breaking-space does not match", - "data": "\u00a0", - "valid": false - }, - { - "description": "zero-width whitespace does not match", - "data": "\ufeff", - "valid": false - }, - { - "description": "line feed does not match (line terminator)", - "data": "\u000a", - "valid": false - }, - { - "description": "paragraph separator does not match (line terminator)", - "data": "\u2029", - "valid": false - }, - { - "description": "EM SPACE does not match (Space_Separator)", - "data": "\u2003", - "valid": false - }, - { - "description": "Non-whitespace control matches", - "data": "\u0001", - "valid": true - }, - { - "description": "Non-whitespace matches", - "data": "\u2013", - "valid": true - } - ] - }, - { - "description": "patterns always use unicode semantics with pattern", - "schema": { "pattern": "\\p{Letter}cole" }, - "tests": [ - { - "description": "ascii character in json string", - "data": "Les hivers de mon enfance etaient des saisons longues, longues. Nous vivions en trois lieux: l'ecole, l'eglise et la patinoire; mais la vraie vie etait sur la patinoire.", - "valid": true - }, - { - "description": "literal unicode character in json string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": true - }, - { - "description": "unicode character in hex format in string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'\u00e9cole, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": true - }, - { - "description": "unicode matching is case-sensitive", - "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", - "valid": false - } - ] - }, - { - "description": "\\w in patterns matches [A-Za-z0-9_], not unicode letters", - "schema": { "pattern": "\\wcole" }, - "tests": [ - { - "description": "ascii character in json string", - "data": "Les hivers de mon enfance etaient des saisons longues, longues. Nous vivions en trois lieux: l'ecole, l'eglise et la patinoire; mais la vraie vie etait sur la patinoire.", - "valid": true - }, - { - "description": "literal unicode character in json string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": false - }, - { - "description": "unicode character in hex format in string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'\u00e9cole, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": false - }, - { - "description": "unicode matching is case-sensitive", - "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", - "valid": false - } - ] - }, - { - "description": "pattern with ASCII ranges", - "schema": { "pattern": "[a-z]cole" }, - "tests": [ - { - "description": "literal unicode character in json string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": false - }, - { - "description": "unicode character in hex format in string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'\u00e9cole, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": false - }, - { - "description": "ascii characters match", - "data": "Les hivers de mon enfance etaient des saisons longues, longues. Nous vivions en trois lieux: l'ecole, l'eglise et la patinoire; mais la vraie vie etait sur la patinoire.", - "valid": true - } - ] - }, - { - "description": "\\d in pattern matches [0-9], not unicode digits", - "schema": { "pattern": "^\\d+$" }, - "tests": [ - { - "description": "ascii digits", - "data": "42", - "valid": true - }, - { - "description": "ascii non-digits", - "data": "-%#", - "valid": false - }, - { - "description": "non-ascii digits (BENGALI DIGIT FOUR, BENGALI DIGIT TWO)", - "data": "৪২", - "valid": false - } - ] - }, - { - "description": "pattern with non-ASCII digits", - "schema": { "pattern": "^\\p{digit}+$" }, - "tests": [ - { - "description": "ascii digits", - "data": "42", - "valid": true - }, - { - "description": "ascii non-digits", - "data": "-%#", - "valid": false - }, - { - "description": "non-ascii digits (BENGALI DIGIT FOUR, BENGALI DIGIT TWO)", - "data": "৪২", - "valid": true - } - ] - }, - { - "description": "patterns always use unicode semantics with patternProperties", - "schema": { - "type": "object", - "patternProperties": { - "\\p{Letter}cole": {} - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "ascii character in json string", - "data": { "l'ecole": "pas de vraie vie" }, - "valid": true - }, - { - "description": "literal unicode character in json string", - "data": { "l'école": "pas de vraie vie" }, - "valid": true - }, - { - "description": "unicode character in hex format in string", - "data": { "l'\u00e9cole": "pas de vraie vie" }, - "valid": true - }, - { - "description": "unicode matching is case-sensitive", - "data": { "L'ÉCOLE": "PAS DE VRAIE VIE" }, - "valid": false - } - ] - }, - { - "description": "\\w in patternProperties matches [A-Za-z0-9_], not unicode letters", - "schema": { - "type": "object", - "patternProperties": { - "\\wcole": {} - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "ascii character in json string", - "data": { "l'ecole": "pas de vraie vie" }, - "valid": true - }, - { - "description": "literal unicode character in json string", - "data": { "l'école": "pas de vraie vie" }, - "valid": false - }, - { - "description": "unicode character in hex format in string", - "data": { "l'\u00e9cole": "pas de vraie vie" }, - "valid": false - }, - { - "description": "unicode matching is case-sensitive", - "data": { "L'ÉCOLE": "PAS DE VRAIE VIE" }, - "valid": false - } - ] - }, - { - "description": "patternProperties with ASCII ranges", - "schema": { - "type": "object", - "patternProperties": { - "[a-z]cole": {} - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "literal unicode character in json string", - "data": { "l'école": "pas de vraie vie" }, - "valid": false - }, - { - "description": "unicode character in hex format in string", - "data": { "l'\u00e9cole": "pas de vraie vie" }, - "valid": false - }, - { - "description": "ascii characters match", - "data": { "l'ecole": "pas de vraie vie" }, - "valid": true - } - ] - }, - { - "description": "\\d in patternProperties matches [0-9], not unicode digits", - "schema": { - "type": "object", - "patternProperties": { - "^\\d+$": {} - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "ascii digits", - "data": { "42": "life, the universe, and everything" }, - "valid": true - }, - { - "description": "ascii non-digits", - "data": { "-%#": "spending the year dead for tax reasons" }, - "valid": false - }, - { - "description": "non-ascii digits (BENGALI DIGIT FOUR, BENGALI DIGIT TWO)", - "data": { "৪২": "khajit has wares if you have coin" }, - "valid": false - } - ] - }, - { - "description": "patternProperties with non-ASCII digits", - "schema": { - "type": "object", - "patternProperties": { - "^\\p{digit}+$": {} - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "ascii digits", - "data": { "42": "life, the universe, and everything" }, - "valid": true - }, - { - "description": "ascii non-digits", - "data": { "-%#": "spending the year dead for tax reasons" }, - "valid": false - }, - { - "description": "non-ascii digits (BENGALI DIGIT FOUR, BENGALI DIGIT TWO)", - "data": { "৪২": "khajit has wares if you have coin" }, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/float-overflow.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/float-overflow.json deleted file mode 100644 index 47fd5baa..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/float-overflow.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "description": "all integers are multiples of 0.5, if overflow is handled", - "schema": {"type": "number", "multipleOf": 0.5}, - "tests": [ - { - "description": "valid if optional overflow handling is implemented", - "data": 1e308, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/date-time.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/date-time.json deleted file mode 100644 index 09112737..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/date-time.json +++ /dev/null @@ -1,133 +0,0 @@ -[ - { - "description": "validation of date-time strings", - "schema": { "format": "date-time" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid date-time string", - "data": "1963-06-19T08:30:06.283185Z", - "valid": true - }, - { - "description": "a valid date-time string without second fraction", - "data": "1963-06-19T08:30:06Z", - "valid": true - }, - { - "description": "a valid date-time string with plus offset", - "data": "1937-01-01T12:00:27.87+00:20", - "valid": true - }, - { - "description": "a valid date-time string with minus offset", - "data": "1990-12-31T15:59:50.123-08:00", - "valid": true - }, - { - "description": "a valid date-time with a leap second, UTC", - "data": "1998-12-31T23:59:60Z", - "valid": true - }, - { - "description": "a valid date-time with a leap second, with minus offset", - "data": "1998-12-31T15:59:60.123-08:00", - "valid": true - }, - { - "description": "an invalid date-time past leap second, UTC", - "data": "1998-12-31T23:59:61Z", - "valid": false - }, - { - "description": "an invalid date-time with leap second on a wrong minute, UTC", - "data": "1998-12-31T23:58:60Z", - "valid": false - }, - { - "description": "an invalid date-time with leap second on a wrong hour, UTC", - "data": "1998-12-31T22:59:60Z", - "valid": false - }, - { - "description": "an invalid day in date-time string", - "data": "1990-02-31T15:59:59.123-08:00", - "valid": false - }, - { - "description": "an invalid offset in date-time string", - "data": "1990-12-31T15:59:59-24:00", - "valid": false - }, - { - "description": "an invalid closing Z after time-zone offset", - "data": "1963-06-19T08:30:06.28123+01:00Z", - "valid": false - }, - { - "description": "an invalid date-time string", - "data": "06/19/1963 08:30:06 PST", - "valid": false - }, - { - "description": "case-insensitive T and Z", - "data": "1963-06-19t08:30:06.283185z", - "valid": true - }, - { - "description": "only RFC3339 not all of ISO 8601 are valid", - "data": "2013-350T01:01:01", - "valid": false - }, - { - "description": "invalid non-padded month dates", - "data": "1963-6-19T08:30:06.283185Z", - "valid": false - }, - { - "description": "invalid non-padded day dates", - "data": "1963-06-1T08:30:06.283185Z", - "valid": false - }, - { - "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", - "data": "1963-06-1৪T00:00:00Z", - "valid": false - }, - { - "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", - "data": "1963-06-11T0৪:00:00Z", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/email.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/email.json deleted file mode 100644 index d6761a46..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/email.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "description": "validation of e-mail addresses", - "schema": { "format": "email" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid e-mail address", - "data": "joe.bloggs@example.com", - "valid": true - }, - { - "description": "an invalid e-mail address", - "data": "2962", - "valid": false - }, - { - "description": "tilde in local part is valid", - "data": "te~st@example.com", - "valid": true - }, - { - "description": "tilde before local part is valid", - "data": "~test@example.com", - "valid": true - }, - { - "description": "tilde after local part is valid", - "data": "test~@example.com", - "valid": true - }, - { - "description": "dot before local part is not valid", - "data": ".test@example.com", - "valid": false - }, - { - "description": "dot after local part is not valid", - "data": "test.@example.com", - "valid": false - }, - { - "description": "two separated dots inside local part are valid", - "data": "te.s.t@example.com", - "valid": true - }, - { - "description": "two subsequent dots inside local part are not valid", - "data": "te..st@example.com", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/hostname.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/hostname.json deleted file mode 100644 index a8ecd194..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/hostname.json +++ /dev/null @@ -1,118 +0,0 @@ -[ - { - "description": "validation of host names", - "schema": { "format": "hostname" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid host name", - "data": "www.example.com", - "valid": true - }, - { - "description": "a valid punycoded IDN hostname", - "data": "xn--4gbwdl.xn--wgbh1c", - "valid": true - }, - { - "description": "a host name starting with an illegal character", - "data": "-a-host-name-that-starts-with--", - "valid": false - }, - { - "description": "a host name containing illegal characters", - "data": "not_a_valid_host_name", - "valid": false - }, - { - "description": "a host name with a component too long", - "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", - "valid": false - }, - { - "description": "starts with hyphen", - "data": "-hostname", - "valid": false - }, - { - "description": "ends with hyphen", - "data": "hostname-", - "valid": false - }, - { - "description": "starts with underscore", - "data": "_hostname", - "valid": false - }, - { - "description": "ends with underscore", - "data": "hostname_", - "valid": false - }, - { - "description": "contains underscore", - "data": "host_name", - "valid": false - }, - { - "description": "maximum label length", - "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com", - "valid": true - }, - { - "description": "exceeds maximum label length", - "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com", - "valid": false - }, - { - "description": "single label", - "data": "hostname", - "valid": true - }, - { - "description": "single label with hyphen", - "data": "host-name", - "valid": true - }, - { - "description": "single label with digits", - "data": "h0stn4me", - "valid": true - }, - { - "description": "single label ending with digit", - "data": "hostnam3", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/ipv4.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/ipv4.json deleted file mode 100644 index 9680fe62..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/ipv4.json +++ /dev/null @@ -1,89 +0,0 @@ -[ - { - "description": "validation of IP addresses", - "schema": { "format": "ipv4" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid IP address", - "data": "192.168.0.1", - "valid": true - }, - { - "description": "an IP address with too many components", - "data": "127.0.0.0.1", - "valid": false - }, - { - "description": "an IP address with out-of-range values", - "data": "256.256.256.256", - "valid": false - }, - { - "description": "an IP address without 4 components", - "data": "127.0", - "valid": false - }, - { - "description": "an IP address as an integer", - "data": "0x7f000001", - "valid": false - }, - { - "description": "an IP address as an integer (decimal)", - "data": "2130706433", - "valid": false - }, - { - "description": "invalid leading zeroes, as they are treated as octals", - "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/", - "data": "087.10.0.1", - "valid": false - }, - { - "description": "value without leading zero is valid", - "data": "87.10.0.1", - "valid": true - }, - { - "description": "invalid non-ASCII '২' (a Bengali 2)", - "data": "1২7.0.0.1", - "valid": false - }, - { - "description": "netmask is not a part of ipv4 address", - "data": "192.168.1.0/24", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/ipv6.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/ipv6.json deleted file mode 100644 index 94368f2a..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/ipv6.json +++ /dev/null @@ -1,208 +0,0 @@ -[ - { - "description": "validation of IPv6 addresses", - "schema": { "format": "ipv6" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid IPv6 address", - "data": "::1", - "valid": true - }, - { - "description": "an IPv6 address with out-of-range values", - "data": "12345::", - "valid": false - }, - { - "description": "trailing 4 hex symbols is valid", - "data": "::abef", - "valid": true - }, - { - "description": "trailing 5 hex symbols is invalid", - "data": "::abcef", - "valid": false - }, - { - "description": "an IPv6 address with too many components", - "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", - "valid": false - }, - { - "description": "an IPv6 address containing illegal characters", - "data": "::laptop", - "valid": false - }, - { - "description": "no digits is valid", - "data": "::", - "valid": true - }, - { - "description": "leading colons is valid", - "data": "::42:ff:1", - "valid": true - }, - { - "description": "trailing colons is valid", - "data": "d6::", - "valid": true - }, - { - "description": "missing leading octet is invalid", - "data": ":2:3:4:5:6:7:8", - "valid": false - }, - { - "description": "missing trailing octet is invalid", - "data": "1:2:3:4:5:6:7:", - "valid": false - }, - { - "description": "missing leading octet with omitted octets later", - "data": ":2:3:4::8", - "valid": false - }, - { - "description": "single set of double colons in the middle is valid", - "data": "1:d6::42", - "valid": true - }, - { - "description": "two sets of double colons is invalid", - "data": "1::d6::42", - "valid": false - }, - { - "description": "mixed format with the ipv4 section as decimal octets", - "data": "1::d6:192.168.0.1", - "valid": true - }, - { - "description": "mixed format with double colons between the sections", - "data": "1:2::192.168.0.1", - "valid": true - }, - { - "description": "mixed format with ipv4 section with octet out of range", - "data": "1::2:192.168.256.1", - "valid": false - }, - { - "description": "mixed format with ipv4 section with a hex octet", - "data": "1::2:192.168.ff.1", - "valid": false - }, - { - "description": "mixed format with leading double colons (ipv4-mapped ipv6 address)", - "data": "::ffff:192.168.0.1", - "valid": true - }, - { - "description": "triple colons is invalid", - "data": "1:2:3:4:5:::8", - "valid": false - }, - { - "description": "8 octets", - "data": "1:2:3:4:5:6:7:8", - "valid": true - }, - { - "description": "insufficient octets without double colons", - "data": "1:2:3:4:5:6:7", - "valid": false - }, - { - "description": "no colons is invalid", - "data": "1", - "valid": false - }, - { - "description": "ipv4 is not ipv6", - "data": "127.0.0.1", - "valid": false - }, - { - "description": "ipv4 segment must have 4 octets", - "data": "1:2:3:4:1.2.3", - "valid": false - }, - { - "description": "leading whitespace is invalid", - "data": " ::1", - "valid": false - }, - { - "description": "trailing whitespace is invalid", - "data": "::1 ", - "valid": false - }, - { - "description": "netmask is not a part of ipv6 address", - "data": "fe80::/64", - "valid": false - }, - { - "description": "zone id is not a part of ipv6 address", - "data": "fe80::a%eth1", - "valid": false - }, - { - "description": "a long valid ipv6", - "data": "1000:1000:1000:1000:1000:1000:255.255.255.255", - "valid": true - }, - { - "description": "a long invalid ipv6, below length limit, first", - "data": "100:100:100:100:100:100:255.255.255.255.255", - "valid": false - }, - { - "description": "a long invalid ipv6, below length limit, second", - "data": "100:100:100:100:100:100:100:255.255.255.255", - "valid": false - }, - { - "description": "invalid non-ASCII '৪' (a Bengali 4)", - "data": "1:2:3:4:5:6:7:৪", - "valid": false - }, - { - "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion", - "data": "1:2::192.16৪.0.1", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/unknown.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/unknown.json deleted file mode 100644 index 12339ae5..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/unknown.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "description": "unknown format", - "schema": { "format": "unknown" }, - "tests": [ - { - "description": "unknown formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "unknown formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "unknown formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "unknown formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "unknown formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "unknown formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "unknown formats ignore strings", - "data": "string", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/uri.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/uri.json deleted file mode 100644 index 4b48d406..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/format/uri.json +++ /dev/null @@ -1,138 +0,0 @@ -[ - { - "description": "validation of URIs", - "schema": { "format": "uri" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid URL with anchor tag", - "data": "http://foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "a valid URL with anchor tag and parentheses", - "data": "http://foo.com/blah_(wikipedia)_blah#cite-1", - "valid": true - }, - { - "description": "a valid URL with URL-encoded stuff", - "data": "http://foo.bar/?q=Test%20URL-encoded%20stuff", - "valid": true - }, - { - "description": "a valid puny-coded URL ", - "data": "http://xn--nw2a.xn--j6w193g/", - "valid": true - }, - { - "description": "a valid URL with many special characters", - "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", - "valid": true - }, - { - "description": "a valid URL based on IPv4", - "data": "http://223.255.255.254", - "valid": true - }, - { - "description": "a valid URL with ftp scheme", - "data": "ftp://ftp.is.co.za/rfc/rfc1808.txt", - "valid": true - }, - { - "description": "a valid URL for a simple text file", - "data": "http://www.ietf.org/rfc/rfc2396.txt", - "valid": true - }, - { - "description": "a valid URL ", - "data": "ldap://[2001:db8::7]/c=GB?objectClass?one", - "valid": true - }, - { - "description": "a valid mailto URI", - "data": "mailto:John.Doe@example.com", - "valid": true - }, - { - "description": "a valid newsgroup URI", - "data": "news:comp.infosystems.www.servers.unix", - "valid": true - }, - { - "description": "a valid tel URI", - "data": "tel:+1-816-555-1212", - "valid": true - }, - { - "description": "a valid URN", - "data": "urn:oasis:names:specification:docbook:dtd:xml:4.1.2", - "valid": true - }, - { - "description": "an invalid protocol-relative URI Reference", - "data": "//foo.bar/?baz=qux#quux", - "valid": false - }, - { - "description": "an invalid relative URI Reference", - "data": "/abc", - "valid": false - }, - { - "description": "an invalid URI", - "data": "\\\\WINDOWS\\fileshare", - "valid": false - }, - { - "description": "an invalid URI though valid URI reference", - "data": "abc", - "valid": false - }, - { - "description": "an invalid URI with spaces", - "data": "http:// shouldfail.com", - "valid": false - }, - { - "description": "an invalid URI with spaces and missing scheme", - "data": ":// should fail", - "valid": false - }, - { - "description": "an invalid URI with comma in scheme", - "data": "bar,baz:foo", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/id.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/id.json deleted file mode 100644 index 1c91d33e..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/id.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "description": "id inside an enum is not a real identifier", - "comment": "the implementation must not be confused by an id buried in the enum", - "schema": { - "definitions": { - "id_in_enum": { - "enum": [ - { - "id": "https://localhost:1234/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "id": "https://localhost:1234/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "id": "https://localhost:1234/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { "$ref": "#/definitions/id_in_enum" }, - { "$ref": "https://localhost:1234/my_identifier.json" } - ] - }, - "tests": [ - { - "description": "exact match to enum, and type matches", - "data": { - "id": "https://localhost:1234/my_identifier.json", - "type": "null" - }, - "valid": true - }, - { - "description": "match $ref to id", - "data": "a string to match #/definitions/id_in_enum", - "valid": true - }, - { - "description": "no match on enum or $ref to id", - "data": 1, - "valid": false - } - ] - } - -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/non-bmp-regex.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/non-bmp-regex.json deleted file mode 100644 index dd67af2b..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/non-bmp-regex.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "description": "Proper UTF-16 surrogate pair handling: pattern", - "comment": "Optional because .Net doesn't correctly handle 32-bit Unicode characters", - "schema": { "pattern": "^🐲*$" }, - "tests": [ - { - "description": "matches empty", - "data": "", - "valid": true - }, - { - "description": "matches single", - "data": "🐲", - "valid": true - }, - { - "description": "matches two", - "data": "🐲🐲", - "valid": true - }, - { - "description": "doesn't match one", - "data": "🐉", - "valid": false - }, - { - "description": "doesn't match two", - "data": "🐉🐉", - "valid": false - }, - { - "description": "doesn't match one ASCII", - "data": "D", - "valid": false - }, - { - "description": "doesn't match two ASCII", - "data": "DD", - "valid": false - } - ] - }, - { - "description": "Proper UTF-16 surrogate pair handling: patternProperties", - "comment": "Optional because .Net doesn't correctly handle 32-bit Unicode characters", - "schema": { - "patternProperties": { - "^🐲*$": { - "type": "integer" - } - } - }, - "tests": [ - { - "description": "matches empty", - "data": { "": 1 }, - "valid": true - }, - { - "description": "matches single", - "data": { "🐲": 1 }, - "valid": true - }, - { - "description": "matches two", - "data": { "🐲🐲": 1 }, - "valid": true - }, - { - "description": "doesn't match one", - "data": { "🐲": "hello" }, - "valid": false - }, - { - "description": "doesn't match two", - "data": { "🐲🐲": "hello" }, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/zeroTerminatedFloats.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/zeroTerminatedFloats.json deleted file mode 100644 index 9b50ea27..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/optional/zeroTerminatedFloats.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "description": "some languages do not distinguish between different types of numeric value", - "schema": { - "type": "integer" - }, - "tests": [ - { - "description": "a float is not an integer even without fractional part", - "data": 1.0, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/pattern.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/pattern.json deleted file mode 100644 index 92db0f97..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/pattern.json +++ /dev/null @@ -1,59 +0,0 @@ -[ - { - "description": "pattern validation", - "schema": {"pattern": "^a*$"}, - "tests": [ - { - "description": "a matching pattern is valid", - "data": "aaa", - "valid": true - }, - { - "description": "a non-matching pattern is invalid", - "data": "abc", - "valid": false - }, - { - "description": "ignores booleans", - "data": true, - "valid": true - }, - { - "description": "ignores integers", - "data": 123, - "valid": true - }, - { - "description": "ignores floats", - "data": 1.0, - "valid": true - }, - { - "description": "ignores objects", - "data": {}, - "valid": true - }, - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores null", - "data": null, - "valid": true - } - ] - }, - { - "description": "pattern is not anchored", - "schema": {"pattern": "a+"}, - "tests": [ - { - "description": "matches a substring", - "data": "xxaayy", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/patternProperties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/patternProperties.json deleted file mode 100644 index 51c8af3d..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/patternProperties.json +++ /dev/null @@ -1,135 +0,0 @@ -[ - { - "description": - "patternProperties validates properties matching a regex", - "schema": { - "patternProperties": { - "f.*o": {"type": "integer"} - } - }, - "tests": [ - { - "description": "a single valid match is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "multiple valid matches is valid", - "data": {"foo": 1, "foooooo" : 2}, - "valid": true - }, - { - "description": "a single invalid match is invalid", - "data": {"foo": "bar", "fooooo": 2}, - "valid": false - }, - { - "description": "multiple invalid matches is invalid", - "data": {"foo": "bar", "foooooo" : "baz"}, - "valid": false - }, - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores strings", - "data": "", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "multiple simultaneous patternProperties are validated", - "schema": { - "patternProperties": { - "a*": {"type": "integer"}, - "aaa*": {"maximum": 20} - } - }, - "tests": [ - { - "description": "a single valid match is valid", - "data": {"a": 21}, - "valid": true - }, - { - "description": "a simultaneous match is valid", - "data": {"aaaa": 18}, - "valid": true - }, - { - "description": "multiple matches is valid", - "data": {"a": 21, "aaaa": 18}, - "valid": true - }, - { - "description": "an invalid due to one is invalid", - "data": {"a": "bar"}, - "valid": false - }, - { - "description": "an invalid due to the other is invalid", - "data": {"aaaa": 31}, - "valid": false - }, - { - "description": "an invalid due to both is invalid", - "data": {"aaa": "foo", "aaaa": 31}, - "valid": false - } - ] - }, - { - "description": "regexes are not anchored by default and are case sensitive", - "schema": { - "patternProperties": { - "[0-9]{2,}": { "type": "boolean" }, - "X_": { "type": "string" } - } - }, - "tests": [ - { - "description": "non recognized members are ignored", - "data": { "answer 1": "42" }, - "valid": true - }, - { - "description": "recognized members are accounted for", - "data": { "a31b": null }, - "valid": false - }, - { - "description": "regexes are case sensitive", - "data": { "a_x_3": 3 }, - "valid": true - }, - { - "description": "regexes are case sensitive, 2", - "data": { "a_X_3": 3 }, - "valid": false - } - ] - }, - { - "description": "patternProperties with null valued instance properties", - "schema": { - "patternProperties": { - "^.*bar$": {"type": "null"} - } - }, - "tests": [ - { - "description": "allows null values", - "data": {"foobar": null}, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/properties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/properties.json deleted file mode 100644 index 195159e6..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/properties.json +++ /dev/null @@ -1,205 +0,0 @@ -[ - { - "description": "object properties validation", - "schema": { - "properties": { - "foo": {"type": "integer"}, - "bar": {"type": "string"} - } - }, - "tests": [ - { - "description": "both properties present and valid is valid", - "data": {"foo": 1, "bar": "baz"}, - "valid": true - }, - { - "description": "one property invalid is invalid", - "data": {"foo": 1, "bar": {}}, - "valid": false - }, - { - "description": "both properties invalid is invalid", - "data": {"foo": [], "bar": {}}, - "valid": false - }, - { - "description": "doesn't invalidate other properties", - "data": {"quux": []}, - "valid": true - }, - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": - "properties, patternProperties, additionalProperties interaction", - "schema": { - "properties": { - "foo": {"type": "array", "maxItems": 3}, - "bar": {"type": "array"} - }, - "patternProperties": {"f.o": {"minItems": 2}}, - "additionalProperties": {"type": "integer"} - }, - "tests": [ - { - "description": "property validates property", - "data": {"foo": [1, 2]}, - "valid": true - }, - { - "description": "property invalidates property", - "data": {"foo": [1, 2, 3, 4]}, - "valid": false - }, - { - "description": "patternProperty invalidates property", - "data": {"foo": []}, - "valid": false - }, - { - "description": "patternProperty validates nonproperty", - "data": {"fxo": [1, 2]}, - "valid": true - }, - { - "description": "patternProperty invalidates nonproperty", - "data": {"fxo": []}, - "valid": false - }, - { - "description": "additionalProperty ignores property", - "data": {"bar": []}, - "valid": true - }, - { - "description": "additionalProperty validates others", - "data": {"quux": 3}, - "valid": true - }, - { - "description": "additionalProperty invalidates others", - "data": {"quux": "foo"}, - "valid": false - } - ] - }, - { - "description": "properties with escaped characters", - "schema": { - "properties": { - "foo\nbar": {"type": "number"}, - "foo\"bar": {"type": "number"}, - "foo\\bar": {"type": "number"}, - "foo\rbar": {"type": "number"}, - "foo\tbar": {"type": "number"}, - "foo\fbar": {"type": "number"} - } - }, - "tests": [ - { - "description": "object with all numbers is valid", - "data": { - "foo\nbar": 1, - "foo\"bar": 1, - "foo\\bar": 1, - "foo\rbar": 1, - "foo\tbar": 1, - "foo\fbar": 1 - }, - "valid": true - }, - { - "description": "object with strings is invalid", - "data": { - "foo\nbar": "1", - "foo\"bar": "1", - "foo\\bar": "1", - "foo\rbar": "1", - "foo\tbar": "1", - "foo\fbar": "1" - }, - "valid": false - } - ] - }, - { - "description": "properties with null valued instance properties", - "schema": { - "properties": { - "foo": {"type": "null"} - } - }, - "tests": [ - { - "description": "allows null values", - "data": {"foo": null}, - "valid": true - } - ] - }, - { - "description": "properties whose names are Javascript object property names", - "comment": "Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object.", - "schema": { - "properties": { - "__proto__": {"type": "number"}, - "toString": { - "properties": { "length": { "type": "string" } } - }, - "constructor": {"type": "number"} - } - }, - "tests": [ - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - }, - { - "description": "none of the properties mentioned", - "data": {}, - "valid": true - }, - { - "description": "__proto__ not valid", - "data": { "__proto__": "foo" }, - "valid": false - }, - { - "description": "toString not valid", - "data": { "toString": { "length": 37 } }, - "valid": false - }, - { - "description": "constructor not valid", - "data": { "constructor": { "length": 37 } }, - "valid": false - }, - { - "description": "all present and valid", - "data": { - "__proto__": 12, - "toString": { "length": "foo" }, - "constructor": 37 - }, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/ref.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/ref.json deleted file mode 100644 index b53bd2ab..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/ref.json +++ /dev/null @@ -1,592 +0,0 @@ -[ - { - "description": "root pointer ref", - "schema": { - "properties": { - "foo": {"$ref": "#"} - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "match", - "data": {"foo": false}, - "valid": true - }, - { - "description": "recursive match", - "data": {"foo": {"foo": false}}, - "valid": true - }, - { - "description": "mismatch", - "data": {"bar": false}, - "valid": false - }, - { - "description": "recursive mismatch", - "data": {"foo": {"bar": false}}, - "valid": false - } - ] - }, - { - "description": "relative pointer ref to object", - "schema": { - "properties": { - "foo": {"type": "integer"}, - "bar": {"$ref": "#/properties/foo"} - } - }, - "tests": [ - { - "description": "match", - "data": {"bar": 3}, - "valid": true - }, - { - "description": "mismatch", - "data": {"bar": true}, - "valid": false - } - ] - }, - { - "description": "relative pointer ref to array", - "schema": { - "items": [ - {"type": "integer"}, - {"$ref": "#/items/0"} - ] - }, - "tests": [ - { - "description": "match array", - "data": [1, 2], - "valid": true - }, - { - "description": "mismatch array", - "data": [1, "foo"], - "valid": false - } - ] - }, - { - "description": "escaped pointer ref", - "schema": { - "definitions": { - "tilde~field": {"type": "integer"}, - "slash/field": {"type": "integer"}, - "percent%field": {"type": "integer"} - }, - "properties": { - "tilde": {"$ref": "#/definitions/tilde~0field"}, - "slash": {"$ref": "#/definitions/slash~1field"}, - "percent": {"$ref": "#/definitions/percent%25field"} - } - }, - "tests": [ - { - "description": "slash invalid", - "data": {"slash": "aoeu"}, - "valid": false - }, - { - "description": "tilde invalid", - "data": {"tilde": "aoeu"}, - "valid": false - }, - { - "description": "percent invalid", - "data": {"percent": "aoeu"}, - "valid": false - }, - { - "description": "slash valid", - "data": {"slash": 123}, - "valid": true - }, - { - "description": "tilde valid", - "data": {"tilde": 123}, - "valid": true - }, - { - "description": "percent valid", - "data": {"percent": 123}, - "valid": true - } - ] - }, - { - "description": "nested refs", - "schema": { - "definitions": { - "a": {"type": "integer"}, - "b": {"$ref": "#/definitions/a"}, - "c": {"$ref": "#/definitions/b"} - }, - "allOf": [{ "$ref": "#/definitions/c" }] - }, - "tests": [ - { - "description": "nested ref valid", - "data": 5, - "valid": true - }, - { - "description": "nested ref invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "ref overrides any sibling keywords", - "schema": { - "definitions": { - "reffed": { - "type": "array" - } - }, - "properties": { - "foo": { - "$ref": "#/definitions/reffed", - "maxItems": 2 - } - } - }, - "tests": [ - { - "description": "ref valid", - "data": { "foo": [] }, - "valid": true - }, - { - "description": "ref valid, maxItems ignored", - "data": { "foo": [ 1, 2, 3] }, - "valid": true - }, - { - "description": "ref invalid", - "data": { "foo": "string" }, - "valid": false - } - ] - }, - { - "description": "$ref prevents a sibling id from changing the base uri", - "schema": { - "id": "http://localhost:1234/sibling_id/base/", - "definitions": { - "foo": { - "id": "http://localhost:1234/sibling_id/foo.json", - "type": "string" - }, - "base_foo": { - "$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json", - "id": "foo.json", - "type": "number" - } - }, - "allOf": [ - { - "$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not http://localhost:1234/sibling_id/foo.json", - "id": "http://localhost:1234/sibling_id/", - "$ref": "foo.json" - } - ] - }, - "tests": [ - { - "description": "$ref resolves to /definitions/base_foo, data does not validate", - "data": "a", - "valid": false - }, - { - "description": "$ref resolves to /definitions/base_foo, data validates", - "data": 1, - "valid": true - } - ] - }, - { - "description": "remote ref, containing refs itself", - "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, - "tests": [ - { - "description": "remote ref valid", - "data": {"minLength": 1}, - "valid": true - }, - { - "description": "remote ref invalid", - "data": {"minLength": -1}, - "valid": false - } - ] - }, - { - "description": "property named $ref that is not a reference", - "schema": { - "properties": { - "$ref": {"type": "string"} - } - }, - "tests": [ - { - "description": "property named $ref valid", - "data": {"$ref": "a"}, - "valid": true - }, - { - "description": "property named $ref invalid", - "data": {"$ref": 2}, - "valid": false - } - ] - }, - { - "description": "property named $ref, containing an actual $ref", - "schema": { - "properties": { - "$ref": {"$ref": "#/definitions/is-string"} - }, - "definitions": { - "is-string": { - "type": "string" - } - } - }, - "tests": [ - { - "description": "property named $ref valid", - "data": {"$ref": "a"}, - "valid": true - }, - { - "description": "property named $ref invalid", - "data": {"$ref": 2}, - "valid": false - } - ] - }, - { - "description": "Recursive references between schemas", - "schema": { - "id": "http://localhost:1234/tree", - "description": "tree of nodes", - "type": "object", - "properties": { - "meta": {"type": "string"}, - "nodes": { - "type": "array", - "items": {"$ref": "node"} - } - }, - "required": ["meta", "nodes"], - "definitions": { - "node": { - "id": "http://localhost:1234/node", - "description": "node", - "type": "object", - "properties": { - "value": {"type": "number"}, - "subtree": {"$ref": "tree"} - }, - "required": ["value"] - } - } - }, - "tests": [ - { - "description": "valid tree", - "data": { - "meta": "root", - "nodes": [ - { - "value": 1, - "subtree": { - "meta": "child", - "nodes": [ - {"value": 1.1}, - {"value": 1.2} - ] - } - }, - { - "value": 2, - "subtree": { - "meta": "child", - "nodes": [ - {"value": 2.1}, - {"value": 2.2} - ] - } - } - ] - }, - "valid": true - }, - { - "description": "invalid tree", - "data": { - "meta": "root", - "nodes": [ - { - "value": 1, - "subtree": { - "meta": "child", - "nodes": [ - {"value": "string is invalid"}, - {"value": 1.2} - ] - } - }, - { - "value": 2, - "subtree": { - "meta": "child", - "nodes": [ - {"value": 2.1}, - {"value": 2.2} - ] - } - } - ] - }, - "valid": false - } - ] - }, - { - "description": "refs with quote", - "schema": { - "properties": { - "foo\"bar": {"$ref": "#/definitions/foo%22bar"} - }, - "definitions": { - "foo\"bar": {"type": "number"} - } - }, - "tests": [ - { - "description": "object with numbers is valid", - "data": { - "foo\"bar": 1 - }, - "valid": true - }, - { - "description": "object with strings is invalid", - "data": { - "foo\"bar": "1" - }, - "valid": false - } - ] - }, - { - "description": "Location-independent identifier", - "schema": { - "allOf": [{ - "$ref": "#foo" - }], - "definitions": { - "A": { - "id": "#foo", - "type": "integer" - } - } - }, - "tests": [ - { - "data": 1, - "description": "match", - "valid": true - }, - { - "data": "a", - "description": "mismatch", - "valid": false - } - ] - }, - { - "description": "Location-independent identifier with base URI change in subschema", - "schema": { - "id": "http://localhost:1234/root", - "allOf": [{ - "$ref": "http://localhost:1234/nested.json#foo" - }], - "definitions": { - "A": { - "id": "nested.json", - "definitions": { - "B": { - "id": "#foo", - "type": "integer" - } - } - } - } - }, - "tests": [ - { - "data": 1, - "description": "match", - "valid": true - }, - { - "data": "a", - "description": "mismatch", - "valid": false - } - ] - }, - { - "description": "naive replacement of $ref with its destination is not correct", - "schema": { - "definitions": { - "a_string": { "type": "string" } - }, - "enum": [ - { "$ref": "#/definitions/a_string" } - ] - }, - "tests": [ - { - "description": "do not evaluate the $ref inside the enum, matching any string", - "data": "this is a string", - "valid": false - }, - { - "description": "match the enum exactly", - "data": { "$ref": "#/definitions/a_string" }, - "valid": true - } - ] - }, - { - "description": "id must be resolved against nearest parent, not just immediate parent", - "schema": { - "id": "http://example.com/a.json", - "definitions": { - "x": { - "id": "http://example.com/b/c.json", - "not": { - "definitions": { - "y": { - "id": "d.json", - "type": "number" - } - } - } - } - }, - "allOf": [ - { - "$ref": "http://example.com/b/d.json" - } - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "non-number is invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "id with file URI still resolves pointers - *nix", - "schema": { - "id": "file:///folder/file.json", - "definitions": { - "foo": { - "type": "number" - } - }, - "allOf": [ - { - "$ref": "#/definitions/foo" - } - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "non-number is invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "id with file URI still resolves pointers - windows", - "schema": { - "id": "file:///c:/folder/file.json", - "definitions": { - "foo": { - "type": "number" - } - }, - "allOf": [ - { - "$ref": "#/definitions/foo" - } - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "non-number is invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "empty tokens in $ref json-pointer", - "schema": { - "definitions": { - "": { - "definitions": { - "": { "type": "number" } - } - } - }, - "allOf": [ - { - "$ref": "#/definitions//definitions/" - } - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "non-number is invalid", - "data": "a", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/refRemote.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/refRemote.json deleted file mode 100644 index 64a618b8..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/refRemote.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "description": "remote ref", - "schema": {"$ref": "http://localhost:1234/integer.json"}, - "tests": [ - { - "description": "remote ref valid", - "data": 1, - "valid": true - }, - { - "description": "remote ref invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "fragment within remote ref", - "schema": {"$ref": "http://localhost:1234/subSchemas.json#/definitions/integer"}, - "tests": [ - { - "description": "remote fragment valid", - "data": 1, - "valid": true - }, - { - "description": "remote fragment invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "ref within remote ref", - "schema": { - "$ref": "http://localhost:1234/subSchemas.json#/definitions/refToInteger" - }, - "tests": [ - { - "description": "ref within ref valid", - "data": 1, - "valid": true - }, - { - "description": "ref within ref invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "base URI change", - "schema": { - "id": "http://localhost:1234/", - "items": { - "id": "baseUriChange/", - "items": {"$ref": "folderInteger.json"} - } - }, - "tests": [ - { - "description": "base URI change ref valid", - "data": [[1]], - "valid": true - }, - { - "description": "base URI change ref invalid", - "data": [["a"]], - "valid": false - } - ] - }, - { - "description": "base URI change - change folder", - "schema": { - "id": "http://localhost:1234/scope_change_defs1.json", - "type" : "object", - "properties": { - "list": {"$ref": "#/definitions/baz"} - }, - "definitions": { - "baz": { - "id": "baseUriChangeFolder/", - "type": "array", - "items": {"$ref": "folderInteger.json"} - } - } - }, - "tests": [ - { - "description": "number is valid", - "data": {"list": [1]}, - "valid": true - }, - { - "description": "string is invalid", - "data": {"list": ["a"]}, - "valid": false - } - ] - }, - { - "description": "base URI change - change folder in subschema", - "schema": { - "id": "http://localhost:1234/scope_change_defs2.json", - "type" : "object", - "properties": { - "list": {"$ref": "#/definitions/baz/definitions/bar"} - }, - "definitions": { - "baz": { - "id": "baseUriChangeFolderInSubschema/", - "definitions": { - "bar": { - "type": "array", - "items": {"$ref": "folderInteger.json"} - } - } - } - } - }, - "tests": [ - { - "description": "number is valid", - "data": {"list": [1]}, - "valid": true - }, - { - "description": "string is invalid", - "data": {"list": ["a"]}, - "valid": false - } - ] - }, - { - "description": "root ref in remote ref", - "schema": { - "id": "http://localhost:1234/object", - "type": "object", - "properties": { - "name": {"$ref": "name.json#/definitions/orNull"} - } - }, - "tests": [ - { - "description": "string is valid", - "data": { - "name": "foo" - }, - "valid": true - }, - { - "description": "null is valid", - "data": { - "name": null - }, - "valid": true - }, - { - "description": "object is invalid", - "data": { - "name": { - "name": null - } - }, - "valid": false - } - ] - }, - { - "description": "Location-independent identifier in remote ref", - "schema": { - "$ref": "http://localhost:1234/locationIndependentIdentifierDraft4.json#/definitions/refToInteger" - }, - "tests": [ - { - "description": "integer is valid", - "data": 1, - "valid": true - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/required.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/required.json deleted file mode 100644 index 6ccfdc2d..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/required.json +++ /dev/null @@ -1,135 +0,0 @@ -[ - { - "description": "required validation", - "schema": { - "properties": { - "foo": {}, - "bar": {} - }, - "required": ["foo"] - }, - "tests": [ - { - "description": "present required property is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "non-present required property is invalid", - "data": {"bar": 1}, - "valid": false - }, - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores strings", - "data": "", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "required default validation", - "schema": { - "properties": { - "foo": {} - } - }, - "tests": [ - { - "description": "not required by default", - "data": {}, - "valid": true - } - ] - }, - { - "description": "required with escaped characters", - "schema": { - "required": [ - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" - ] - }, - "tests": [ - { - "description": "object with all properties present is valid", - "data": { - "foo\nbar": 1, - "foo\"bar": 1, - "foo\\bar": 1, - "foo\rbar": 1, - "foo\tbar": 1, - "foo\fbar": 1 - }, - "valid": true - }, - { - "description": "object with some properties missing is invalid", - "data": { - "foo\nbar": "1", - "foo\"bar": "1" - }, - "valid": false - } - ] - }, - { - "description": "required properties whose names are Javascript object property names", - "comment": "Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object.", - "schema": { "required": ["__proto__", "toString", "constructor"] }, - "tests": [ - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - }, - { - "description": "none of the properties mentioned", - "data": {}, - "valid": false - }, - { - "description": "__proto__ present", - "data": { "__proto__": "foo" }, - "valid": false - }, - { - "description": "toString present", - "data": { "toString": { "length": 37 } }, - "valid": false - }, - { - "description": "constructor present", - "data": { "constructor": { "length": 37 } }, - "valid": false - }, - { - "description": "all present", - "data": { - "__proto__": 12, - "toString": { "length": "foo" }, - "constructor": 37 - }, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/type.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/type.json deleted file mode 100644 index df46677b..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/type.json +++ /dev/null @@ -1,469 +0,0 @@ -[ - { - "description": "integer type matches integers", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "an integer is an integer", - "data": 1, - "valid": true - }, - { - "description": "a float is not an integer", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not an integer", - "data": "foo", - "valid": false - }, - { - "description": "a string is still not an integer, even if it looks like one", - "data": "1", - "valid": false - }, - { - "description": "an object is not an integer", - "data": {}, - "valid": false - }, - { - "description": "an array is not an integer", - "data": [], - "valid": false - }, - { - "description": "a boolean is not an integer", - "data": true, - "valid": false - }, - { - "description": "null is not an integer", - "data": null, - "valid": false - } - ] - }, - { - "description": "number type matches numbers", - "schema": {"type": "number"}, - "tests": [ - { - "description": "an integer is a number", - "data": 1, - "valid": true - }, - { - "description": "a float with zero fractional part is a number", - "data": 1.0, - "valid": true - }, - { - "description": "a float is a number", - "data": 1.1, - "valid": true - }, - { - "description": "a string is not a number", - "data": "foo", - "valid": false - }, - { - "description": "a string is still not a number, even if it looks like one", - "data": "1", - "valid": false - }, - { - "description": "an object is not a number", - "data": {}, - "valid": false - }, - { - "description": "an array is not a number", - "data": [], - "valid": false - }, - { - "description": "a boolean is not a number", - "data": true, - "valid": false - }, - { - "description": "null is not a number", - "data": null, - "valid": false - } - ] - }, - { - "description": "string type matches strings", - "schema": {"type": "string"}, - "tests": [ - { - "description": "1 is not a string", - "data": 1, - "valid": false - }, - { - "description": "a float is not a string", - "data": 1.1, - "valid": false - }, - { - "description": "a string is a string", - "data": "foo", - "valid": true - }, - { - "description": "a string is still a string, even if it looks like a number", - "data": "1", - "valid": true - }, - { - "description": "an empty string is still a string", - "data": "", - "valid": true - }, - { - "description": "an object is not a string", - "data": {}, - "valid": false - }, - { - "description": "an array is not a string", - "data": [], - "valid": false - }, - { - "description": "a boolean is not a string", - "data": true, - "valid": false - }, - { - "description": "null is not a string", - "data": null, - "valid": false - } - ] - }, - { - "description": "object type matches objects", - "schema": {"type": "object"}, - "tests": [ - { - "description": "an integer is not an object", - "data": 1, - "valid": false - }, - { - "description": "a float is not an object", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not an object", - "data": "foo", - "valid": false - }, - { - "description": "an object is an object", - "data": {}, - "valid": true - }, - { - "description": "an array is not an object", - "data": [], - "valid": false - }, - { - "description": "a boolean is not an object", - "data": true, - "valid": false - }, - { - "description": "null is not an object", - "data": null, - "valid": false - } - ] - }, - { - "description": "array type matches arrays", - "schema": {"type": "array"}, - "tests": [ - { - "description": "an integer is not an array", - "data": 1, - "valid": false - }, - { - "description": "a float is not an array", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not an array", - "data": "foo", - "valid": false - }, - { - "description": "an object is not an array", - "data": {}, - "valid": false - }, - { - "description": "an array is an array", - "data": [], - "valid": true - }, - { - "description": "a boolean is not an array", - "data": true, - "valid": false - }, - { - "description": "null is not an array", - "data": null, - "valid": false - } - ] - }, - { - "description": "boolean type matches booleans", - "schema": {"type": "boolean"}, - "tests": [ - { - "description": "an integer is not a boolean", - "data": 1, - "valid": false - }, - { - "description": "zero is not a boolean", - "data": 0, - "valid": false - }, - { - "description": "a float is not a boolean", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not a boolean", - "data": "foo", - "valid": false - }, - { - "description": "an empty string is not a boolean", - "data": "", - "valid": false - }, - { - "description": "an object is not a boolean", - "data": {}, - "valid": false - }, - { - "description": "an array is not a boolean", - "data": [], - "valid": false - }, - { - "description": "true is a boolean", - "data": true, - "valid": true - }, - { - "description": "false is a boolean", - "data": false, - "valid": true - }, - { - "description": "null is not a boolean", - "data": null, - "valid": false - } - ] - }, - { - "description": "null type matches only the null object", - "schema": {"type": "null"}, - "tests": [ - { - "description": "an integer is not null", - "data": 1, - "valid": false - }, - { - "description": "a float is not null", - "data": 1.1, - "valid": false - }, - { - "description": "zero is not null", - "data": 0, - "valid": false - }, - { - "description": "a string is not null", - "data": "foo", - "valid": false - }, - { - "description": "an empty string is not null", - "data": "", - "valid": false - }, - { - "description": "an object is not null", - "data": {}, - "valid": false - }, - { - "description": "an array is not null", - "data": [], - "valid": false - }, - { - "description": "true is not null", - "data": true, - "valid": false - }, - { - "description": "false is not null", - "data": false, - "valid": false - }, - { - "description": "null is null", - "data": null, - "valid": true - } - ] - }, - { - "description": "multiple types can be specified in an array", - "schema": {"type": ["integer", "string"]}, - "tests": [ - { - "description": "an integer is valid", - "data": 1, - "valid": true - }, - { - "description": "a string is valid", - "data": "foo", - "valid": true - }, - { - "description": "a float is invalid", - "data": 1.1, - "valid": false - }, - { - "description": "an object is invalid", - "data": {}, - "valid": false - }, - { - "description": "an array is invalid", - "data": [], - "valid": false - }, - { - "description": "a boolean is invalid", - "data": true, - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - } - ] - }, - { - "description": "type as array with one item", - "schema": { - "type": ["string"] - }, - "tests": [ - { - "description": "string is valid", - "data": "foo", - "valid": true - }, - { - "description": "number is invalid", - "data": 123, - "valid": false - } - ] - }, - { - "description": "type: array or object", - "schema": { - "type": ["array", "object"] - }, - "tests": [ - { - "description": "array is valid", - "data": [1,2,3], - "valid": true - }, - { - "description": "object is valid", - "data": {"foo": 123}, - "valid": true - }, - { - "description": "number is invalid", - "data": 123, - "valid": false - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - } - ] - }, - { - "description": "type: array, object or null", - "schema": { - "type": ["array", "object", "null"] - }, - "tests": [ - { - "description": "array is valid", - "data": [1,2,3], - "valid": true - }, - { - "description": "object is valid", - "data": {"foo": 123}, - "valid": true - }, - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "number is invalid", - "data": 123, - "valid": false - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/uniqueItems.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/uniqueItems.json deleted file mode 100644 index d2730c60..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft4/uniqueItems.json +++ /dev/null @@ -1,409 +0,0 @@ -[ - { - "description": "uniqueItems validation", - "schema": {"uniqueItems": true}, - "tests": [ - { - "description": "unique array of integers is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "non-unique array of integers is invalid", - "data": [1, 1], - "valid": false - }, - { - "description": "non-unique array of more than two integers is invalid", - "data": [1, 2, 1], - "valid": false - }, - { - "description": "numbers are unique if mathematically unequal", - "data": [1.0, 1.00, 1], - "valid": false - }, - { - "description": "false is not equal to zero", - "data": [0, false], - "valid": true - }, - { - "description": "true is not equal to one", - "data": [1, true], - "valid": true - }, - { - "description": "unique array of strings is valid", - "data": ["foo", "bar", "baz"], - "valid": true - }, - { - "description": "non-unique array of strings is invalid", - "data": ["foo", "bar", "foo"], - "valid": false - }, - { - "description": "unique array of objects is valid", - "data": [{"foo": "bar"}, {"foo": "baz"}], - "valid": true - }, - { - "description": "non-unique array of objects is invalid", - "data": [{"foo": "bar"}, {"foo": "bar"}], - "valid": false - }, - { - "description": "property order of array of objects is ignored", - "data": [{"foo": "bar", "bar": "foo"}, {"bar": "foo", "foo": "bar"}], - "valid": false - }, - { - "description": "unique array of nested objects is valid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : false}}} - ], - "valid": true - }, - { - "description": "non-unique array of nested objects is invalid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : true}}} - ], - "valid": false - }, - { - "description": "unique array of arrays is valid", - "data": [["foo"], ["bar"]], - "valid": true - }, - { - "description": "non-unique array of arrays is invalid", - "data": [["foo"], ["foo"]], - "valid": false - }, - { - "description": "non-unique array of more than two arrays is invalid", - "data": [["foo"], ["bar"], ["foo"]], - "valid": false - }, - { - "description": "1 and true are unique", - "data": [1, true], - "valid": true - }, - { - "description": "0 and false are unique", - "data": [0, false], - "valid": true - }, - { - "description": "[1] and [true] are unique", - "data": [[1], [true]], - "valid": true - }, - { - "description": "[0] and [false] are unique", - "data": [[0], [false]], - "valid": true - }, - { - "description": "nested [1] and [true] are unique", - "data": [[[1], "foo"], [[true], "foo"]], - "valid": true - }, - { - "description": "nested [0] and [false] are unique", - "data": [[[0], "foo"], [[false], "foo"]], - "valid": true - }, - { - "description": "unique heterogeneous types are valid", - "data": [{}, [1], true, null, 1, "{}"], - "valid": true - }, - { - "description": "non-unique heterogeneous types are invalid", - "data": [{}, [1], true, null, {}, 1], - "valid": false - }, - { - "description": "different objects are unique", - "data": [{"a": 1, "b": 2}, {"a": 2, "b": 1}], - "valid": true - }, - { - "description": "objects are non-unique despite key order", - "data": [{"a": 1, "b": 2}, {"b": 2, "a": 1}], - "valid": false - }, - { - "description": "{\"a\": false} and {\"a\": 0} are unique", - "data": [{"a": false}, {"a": 0}], - "valid": true - }, - { - "description": "{\"a\": true} and {\"a\": 1} are unique", - "data": [{"a": true}, {"a": 1}], - "valid": true - } - ] - }, - { - "description": "uniqueItems with an array of items", - "schema": { - "items": [{"type": "boolean"}, {"type": "boolean"}], - "uniqueItems": true - }, - "tests": [ - { - "description": "[false, true] from items array is valid", - "data": [false, true], - "valid": true - }, - { - "description": "[true, false] from items array is valid", - "data": [true, false], - "valid": true - }, - { - "description": "[false, false] from items array is not valid", - "data": [false, false], - "valid": false - }, - { - "description": "[true, true] from items array is not valid", - "data": [true, true], - "valid": false - }, - { - "description": "unique array extended from [false, true] is valid", - "data": [false, true, "foo", "bar"], - "valid": true - }, - { - "description": "unique array extended from [true, false] is valid", - "data": [true, false, "foo", "bar"], - "valid": true - }, - { - "description": "non-unique array extended from [false, true] is not valid", - "data": [false, true, "foo", "foo"], - "valid": false - }, - { - "description": "non-unique array extended from [true, false] is not valid", - "data": [true, false, "foo", "foo"], - "valid": false - } - ] - }, - { - "description": "uniqueItems with an array of items and additionalItems=false", - "schema": { - "items": [{"type": "boolean"}, {"type": "boolean"}], - "uniqueItems": true, - "additionalItems": false - }, - "tests": [ - { - "description": "[false, true] from items array is valid", - "data": [false, true], - "valid": true - }, - { - "description": "[true, false] from items array is valid", - "data": [true, false], - "valid": true - }, - { - "description": "[false, false] from items array is not valid", - "data": [false, false], - "valid": false - }, - { - "description": "[true, true] from items array is not valid", - "data": [true, true], - "valid": false - }, - { - "description": "extra items are invalid even if unique", - "data": [false, true, null], - "valid": false - } - ] - }, - { - "description": "uniqueItems=false validation", - "schema": { "uniqueItems": false }, - "tests": [ - { - "description": "unique array of integers is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "non-unique array of integers is valid", - "data": [1, 1], - "valid": true - }, - { - "description": "numbers are unique if mathematically unequal", - "data": [1.0, 1.00, 1], - "valid": true - }, - { - "description": "false is not equal to zero", - "data": [0, false], - "valid": true - }, - { - "description": "true is not equal to one", - "data": [1, true], - "valid": true - }, - { - "description": "unique array of objects is valid", - "data": [{"foo": "bar"}, {"foo": "baz"}], - "valid": true - }, - { - "description": "non-unique array of objects is valid", - "data": [{"foo": "bar"}, {"foo": "bar"}], - "valid": true - }, - { - "description": "unique array of nested objects is valid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : false}}} - ], - "valid": true - }, - { - "description": "non-unique array of nested objects is valid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : true}}} - ], - "valid": true - }, - { - "description": "unique array of arrays is valid", - "data": [["foo"], ["bar"]], - "valid": true - }, - { - "description": "non-unique array of arrays is valid", - "data": [["foo"], ["foo"]], - "valid": true - }, - { - "description": "1 and true are unique", - "data": [1, true], - "valid": true - }, - { - "description": "0 and false are unique", - "data": [0, false], - "valid": true - }, - { - "description": "unique heterogeneous types are valid", - "data": [{}, [1], true, null, 1], - "valid": true - }, - { - "description": "non-unique heterogeneous types are valid", - "data": [{}, [1], true, null, {}, 1], - "valid": true - } - ] - }, - { - "description": "uniqueItems=false with an array of items", - "schema": { - "items": [{"type": "boolean"}, {"type": "boolean"}], - "uniqueItems": false - }, - "tests": [ - { - "description": "[false, true] from items array is valid", - "data": [false, true], - "valid": true - }, - { - "description": "[true, false] from items array is valid", - "data": [true, false], - "valid": true - }, - { - "description": "[false, false] from items array is valid", - "data": [false, false], - "valid": true - }, - { - "description": "[true, true] from items array is valid", - "data": [true, true], - "valid": true - }, - { - "description": "unique array extended from [false, true] is valid", - "data": [false, true, "foo", "bar"], - "valid": true - }, - { - "description": "unique array extended from [true, false] is valid", - "data": [true, false, "foo", "bar"], - "valid": true - }, - { - "description": "non-unique array extended from [false, true] is valid", - "data": [false, true, "foo", "foo"], - "valid": true - }, - { - "description": "non-unique array extended from [true, false] is valid", - "data": [true, false, "foo", "foo"], - "valid": true - } - ] - }, - { - "description": "uniqueItems=false with an array of items and additionalItems=false", - "schema": { - "items": [{"type": "boolean"}, {"type": "boolean"}], - "uniqueItems": false, - "additionalItems": false - }, - "tests": [ - { - "description": "[false, true] from items array is valid", - "data": [false, true], - "valid": true - }, - { - "description": "[true, false] from items array is valid", - "data": [true, false], - "valid": true - }, - { - "description": "[false, false] from items array is valid", - "data": [false, false], - "valid": true - }, - { - "description": "[true, true] from items array is valid", - "data": [true, true], - "valid": true - }, - { - "description": "extra items are invalid even if unique", - "data": [false, true, null], - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/additionalItems.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/additionalItems.json deleted file mode 100644 index 2c7d1558..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/additionalItems.json +++ /dev/null @@ -1,206 +0,0 @@ -[ - { - "description": "additionalItems as schema", - "schema": { - "items": [{}], - "additionalItems": {"type": "integer"} - }, - "tests": [ - { - "description": "additional items match schema", - "data": [ null, 2, 3, 4 ], - "valid": true - }, - { - "description": "additional items do not match schema", - "data": [ null, 2, 3, "foo" ], - "valid": false - } - ] - }, - { - "description": "when items is schema, additionalItems does nothing", - "schema": { - "items": { - "type": "integer" - }, - "additionalItems": { - "type": "string" - } - }, - "tests": [ - { - "description": "valid with a array of type integers", - "data": [1,2,3], - "valid": true - }, - { - "description": "invalid with a array of mixed types", - "data": [1,"2","3"], - "valid": false - } - ] - }, - { - "description": "when items is schema, boolean additionalItems does nothing", - "schema": { - "items": {}, - "additionalItems": false - }, - "tests": [ - { - "description": "all items match schema", - "data": [ 1, 2, 3, 4, 5 ], - "valid": true - } - ] - }, - { - "description": "array of items with no additionalItems permitted", - "schema": { - "items": [{}, {}, {}], - "additionalItems": false - }, - "tests": [ - { - "description": "empty array", - "data": [ ], - "valid": true - }, - { - "description": "fewer number of items present (1)", - "data": [ 1 ], - "valid": true - }, - { - "description": "fewer number of items present (2)", - "data": [ 1, 2 ], - "valid": true - }, - { - "description": "equal number of items present", - "data": [ 1, 2, 3 ], - "valid": true - }, - { - "description": "additional items are not permitted", - "data": [ 1, 2, 3, 4 ], - "valid": false - } - ] - }, - { - "description": "additionalItems as false without items", - "schema": {"additionalItems": false}, - "tests": [ - { - "description": - "items defaults to empty schema so everything is valid", - "data": [ 1, 2, 3, 4, 5 ], - "valid": true - }, - { - "description": "ignores non-arrays", - "data": {"foo" : "bar"}, - "valid": true - } - ] - }, - { - "description": "additionalItems are allowed by default", - "schema": {"items": [{"type": "integer"}]}, - "tests": [ - { - "description": "only the first item is validated", - "data": [1, "foo", false], - "valid": true - } - ] - }, - { - "description": "additionalItems does not look in applicators, valid case", - "schema": { - "allOf": [ - { "items": [ { "type": "integer" } ] } - ], - "additionalItems": { "type": "boolean" } - }, - "tests": [ - { - "description": "items defined in allOf are not examined", - "data": [ 1, null ], - "valid": true - } - ] - }, - { - "description": "additionalItems does not look in applicators, invalid case", - "schema": { - "allOf": [ - { "items": [ { "type": "integer" }, { "type": "string" } ] } - ], - "items": [ {"type": "integer" } ], - "additionalItems": { "type": "boolean" } - }, - "tests": [ - { - "description": "items defined in allOf are not examined", - "data": [ 1, "hello" ], - "valid": false - } - ] - }, - { - "description": "items validation adjusts the starting index for additionalItems", - "schema": { - "items": [ { "type": "string" } ], - "additionalItems": { "type": "integer" } - }, - "tests": [ - { - "description": "valid items", - "data": [ "x", 2, 3 ], - "valid": true - }, - { - "description": "wrong type of second item", - "data": [ "x", "y" ], - "valid": false - } - ] - }, - { - "description": "additionalItems with heterogeneous array", - "schema": { - "items": [{}], - "additionalItems": false - }, - "tests": [ - { - "description": "heterogeneous invalid instance", - "data": [ "foo", "bar", 37 ], - "valid": false - }, - { - "description": "valid instance", - "data": [ null ], - "valid": true - } - ] - }, - { - "description": "additionalItems with null instance elements", - "schema": { - "additionalItems": { - "type": "null" - } - }, - "tests": [ - { - "description": "allows null elements", - "data": [ null ], - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/additionalProperties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/additionalProperties.json deleted file mode 100644 index 0f8e1627..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/additionalProperties.json +++ /dev/null @@ -1,147 +0,0 @@ -[ - { - "description": - "additionalProperties being false does not allow other properties", - "schema": { - "properties": {"foo": {}, "bar": {}}, - "patternProperties": { "^v": {} }, - "additionalProperties": false - }, - "tests": [ - { - "description": "no additional properties is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "an additional property is invalid", - "data": {"foo" : 1, "bar" : 2, "quux" : "boom"}, - "valid": false - }, - { - "description": "ignores arrays", - "data": [1, 2, 3], - "valid": true - }, - { - "description": "ignores strings", - "data": "foobarbaz", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - }, - { - "description": "patternProperties are not additional properties", - "data": {"foo":1, "vroom": 2}, - "valid": true - } - ] - }, - { - "description": "non-ASCII pattern with additionalProperties", - "schema": { - "patternProperties": {"^á": {}}, - "additionalProperties": false - }, - "tests": [ - { - "description": "matching the pattern is valid", - "data": {"ármányos": 2}, - "valid": true - }, - { - "description": "not matching the pattern is invalid", - "data": {"élmény": 2}, - "valid": false - } - ] - }, - { - "description": "additionalProperties with schema", - "schema": { - "properties": {"foo": {}, "bar": {}}, - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "no additional properties is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "an additional valid property is valid", - "data": {"foo" : 1, "bar" : 2, "quux" : true}, - "valid": true - }, - { - "description": "an additional invalid property is invalid", - "data": {"foo" : 1, "bar" : 2, "quux" : 12}, - "valid": false - } - ] - }, - { - "description": - "additionalProperties can exist by itself", - "schema": { - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "an additional valid property is valid", - "data": {"foo" : true}, - "valid": true - }, - { - "description": "an additional invalid property is invalid", - "data": {"foo" : 1}, - "valid": false - } - ] - }, - { - "description": "additionalProperties are allowed by default", - "schema": {"properties": {"foo": {}, "bar": {}}}, - "tests": [ - { - "description": "additional properties are allowed", - "data": {"foo": 1, "bar": 2, "quux": true}, - "valid": true - } - ] - }, - { - "description": "additionalProperties does not look in applicators", - "schema": { - "allOf": [ - {"properties": {"foo": {}}} - ], - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "properties defined in allOf are not examined", - "data": {"foo": 1, "bar": true}, - "valid": false - } - ] - }, - { - "description": "additionalProperties with null valued instance properties", - "schema": { - "additionalProperties": { - "type": "null" - } - }, - "tests": [ - { - "description": "allows null values", - "data": {"foo": null}, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/allOf.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/allOf.json deleted file mode 100644 index ec9319e1..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/allOf.json +++ /dev/null @@ -1,294 +0,0 @@ -[ - { - "description": "allOf", - "schema": { - "allOf": [ - { - "properties": { - "bar": {"type": "integer"} - }, - "required": ["bar"] - }, - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - } - ] - }, - "tests": [ - { - "description": "allOf", - "data": {"foo": "baz", "bar": 2}, - "valid": true - }, - { - "description": "mismatch second", - "data": {"foo": "baz"}, - "valid": false - }, - { - "description": "mismatch first", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "wrong type", - "data": {"foo": "baz", "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "allOf with base schema", - "schema": { - "properties": {"bar": {"type": "integer"}}, - "required": ["bar"], - "allOf" : [ - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - }, - { - "properties": { - "baz": {"type": "null"} - }, - "required": ["baz"] - } - ] - }, - "tests": [ - { - "description": "valid", - "data": {"foo": "quux", "bar": 2, "baz": null}, - "valid": true - }, - { - "description": "mismatch base schema", - "data": {"foo": "quux", "baz": null}, - "valid": false - }, - { - "description": "mismatch first allOf", - "data": {"bar": 2, "baz": null}, - "valid": false - }, - { - "description": "mismatch second allOf", - "data": {"foo": "quux", "bar": 2}, - "valid": false - }, - { - "description": "mismatch both", - "data": {"bar": 2}, - "valid": false - } - ] - }, - { - "description": "allOf simple types", - "schema": { - "allOf": [ - {"maximum": 30}, - {"minimum": 20} - ] - }, - "tests": [ - { - "description": "valid", - "data": 25, - "valid": true - }, - { - "description": "mismatch one", - "data": 35, - "valid": false - } - ] - }, - { - "description": "allOf with boolean schemas, all true", - "schema": {"allOf": [true, true]}, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "allOf with boolean schemas, some false", - "schema": {"allOf": [true, false]}, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "allOf with boolean schemas, all false", - "schema": {"allOf": [false, false]}, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "allOf with one empty schema", - "schema": { - "allOf": [ - {} - ] - }, - "tests": [ - { - "description": "any data is valid", - "data": 1, - "valid": true - } - ] - }, - { - "description": "allOf with two empty schemas", - "schema": { - "allOf": [ - {}, - {} - ] - }, - "tests": [ - { - "description": "any data is valid", - "data": 1, - "valid": true - } - ] - }, - { - "description": "allOf with the first empty schema", - "schema": { - "allOf": [ - {}, - { "type": "number" } - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "allOf with the last empty schema", - "schema": { - "allOf": [ - { "type": "number" }, - {} - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "nested allOf, to check validation semantics", - "schema": { - "allOf": [ - { - "allOf": [ - { - "type": "null" - } - ] - } - ] - }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "anything non-null is invalid", - "data": 123, - "valid": false - } - ] - }, - { - "description": "allOf combined with anyOf, oneOf", - "schema": { - "allOf": [ { "multipleOf": 2 } ], - "anyOf": [ { "multipleOf": 3 } ], - "oneOf": [ { "multipleOf": 5 } ] - }, - "tests": [ - { - "description": "allOf: false, anyOf: false, oneOf: false", - "data": 1, - "valid": false - }, - { - "description": "allOf: false, anyOf: false, oneOf: true", - "data": 5, - "valid": false - }, - { - "description": "allOf: false, anyOf: true, oneOf: false", - "data": 3, - "valid": false - }, - { - "description": "allOf: false, anyOf: true, oneOf: true", - "data": 15, - "valid": false - }, - { - "description": "allOf: true, anyOf: false, oneOf: false", - "data": 2, - "valid": false - }, - { - "description": "allOf: true, anyOf: false, oneOf: true", - "data": 10, - "valid": false - }, - { - "description": "allOf: true, anyOf: true, oneOf: false", - "data": 6, - "valid": false - }, - { - "description": "allOf: true, anyOf: true, oneOf: true", - "data": 30, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/anyOf.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/anyOf.json deleted file mode 100644 index ab5eb386..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/anyOf.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "description": "anyOf", - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] - }, - "tests": [ - { - "description": "first anyOf valid", - "data": 1, - "valid": true - }, - { - "description": "second anyOf valid", - "data": 2.5, - "valid": true - }, - { - "description": "both anyOf valid", - "data": 3, - "valid": true - }, - { - "description": "neither anyOf valid", - "data": 1.5, - "valid": false - } - ] - }, - { - "description": "anyOf with base schema", - "schema": { - "type": "string", - "anyOf" : [ - { - "maxLength": 2 - }, - { - "minLength": 4 - } - ] - }, - "tests": [ - { - "description": "mismatch base schema", - "data": 3, - "valid": false - }, - { - "description": "one anyOf valid", - "data": "foobar", - "valid": true - }, - { - "description": "both anyOf invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "anyOf with boolean schemas, all true", - "schema": {"anyOf": [true, true]}, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "anyOf with boolean schemas, some true", - "schema": {"anyOf": [true, false]}, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "anyOf with boolean schemas, all false", - "schema": {"anyOf": [false, false]}, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "anyOf complex types", - "schema": { - "anyOf": [ - { - "properties": { - "bar": {"type": "integer"} - }, - "required": ["bar"] - }, - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - } - ] - }, - "tests": [ - { - "description": "first anyOf valid (complex)", - "data": {"bar": 2}, - "valid": true - }, - { - "description": "second anyOf valid (complex)", - "data": {"foo": "baz"}, - "valid": true - }, - { - "description": "both anyOf valid (complex)", - "data": {"foo": "baz", "bar": 2}, - "valid": true - }, - { - "description": "neither anyOf valid (complex)", - "data": {"foo": 2, "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "anyOf with one empty schema", - "schema": { - "anyOf": [ - { "type": "number" }, - {} - ] - }, - "tests": [ - { - "description": "string is valid", - "data": "foo", - "valid": true - }, - { - "description": "number is valid", - "data": 123, - "valid": true - } - ] - }, - { - "description": "nested anyOf, to check validation semantics", - "schema": { - "anyOf": [ - { - "anyOf": [ - { - "type": "null" - } - ] - } - ] - }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "anything non-null is invalid", - "data": 123, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/boolean_schema.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/boolean_schema.json deleted file mode 100644 index 6d40f23f..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/boolean_schema.json +++ /dev/null @@ -1,104 +0,0 @@ -[ - { - "description": "boolean schema 'true'", - "schema": true, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "string is valid", - "data": "foo", - "valid": true - }, - { - "description": "boolean true is valid", - "data": true, - "valid": true - }, - { - "description": "boolean false is valid", - "data": false, - "valid": true - }, - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "object is valid", - "data": {"foo": "bar"}, - "valid": true - }, - { - "description": "empty object is valid", - "data": {}, - "valid": true - }, - { - "description": "array is valid", - "data": ["foo"], - "valid": true - }, - { - "description": "empty array is valid", - "data": [], - "valid": true - } - ] - }, - { - "description": "boolean schema 'false'", - "schema": false, - "tests": [ - { - "description": "number is invalid", - "data": 1, - "valid": false - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - }, - { - "description": "boolean true is invalid", - "data": true, - "valid": false - }, - { - "description": "boolean false is invalid", - "data": false, - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - }, - { - "description": "object is invalid", - "data": {"foo": "bar"}, - "valid": false - }, - { - "description": "empty object is invalid", - "data": {}, - "valid": false - }, - { - "description": "array is invalid", - "data": ["foo"], - "valid": false - }, - { - "description": "empty array is invalid", - "data": [], - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/const.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/const.json deleted file mode 100644 index 1c2cafcc..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/const.json +++ /dev/null @@ -1,342 +0,0 @@ -[ - { - "description": "const validation", - "schema": {"const": 2}, - "tests": [ - { - "description": "same value is valid", - "data": 2, - "valid": true - }, - { - "description": "another value is invalid", - "data": 5, - "valid": false - }, - { - "description": "another type is invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "const with object", - "schema": {"const": {"foo": "bar", "baz": "bax"}}, - "tests": [ - { - "description": "same object is valid", - "data": {"foo": "bar", "baz": "bax"}, - "valid": true - }, - { - "description": "same object with different property order is valid", - "data": {"baz": "bax", "foo": "bar"}, - "valid": true - }, - { - "description": "another object is invalid", - "data": {"foo": "bar"}, - "valid": false - }, - { - "description": "another type is invalid", - "data": [1, 2], - "valid": false - } - ] - }, - { - "description": "const with array", - "schema": {"const": [{ "foo": "bar" }]}, - "tests": [ - { - "description": "same array is valid", - "data": [{"foo": "bar"}], - "valid": true - }, - { - "description": "another array item is invalid", - "data": [2], - "valid": false - }, - { - "description": "array with additional items is invalid", - "data": [1, 2, 3], - "valid": false - } - ] - }, - { - "description": "const with null", - "schema": {"const": null}, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "not null is invalid", - "data": 0, - "valid": false - } - ] - }, - { - "description": "const with false does not match 0", - "schema": {"const": false}, - "tests": [ - { - "description": "false is valid", - "data": false, - "valid": true - }, - { - "description": "integer zero is invalid", - "data": 0, - "valid": false - }, - { - "description": "float zero is invalid", - "data": 0.0, - "valid": false - } - ] - }, - { - "description": "const with true does not match 1", - "schema": {"const": true}, - "tests": [ - { - "description": "true is valid", - "data": true, - "valid": true - }, - { - "description": "integer one is invalid", - "data": 1, - "valid": false - }, - { - "description": "float one is invalid", - "data": 1.0, - "valid": false - } - ] - }, - { - "description": "const with [false] does not match [0]", - "schema": {"const": [false]}, - "tests": [ - { - "description": "[false] is valid", - "data": [false], - "valid": true - }, - { - "description": "[0] is invalid", - "data": [0], - "valid": false - }, - { - "description": "[0.0] is invalid", - "data": [0.0], - "valid": false - } - ] - }, - { - "description": "const with [true] does not match [1]", - "schema": {"const": [true]}, - "tests": [ - { - "description": "[true] is valid", - "data": [true], - "valid": true - }, - { - "description": "[1] is invalid", - "data": [1], - "valid": false - }, - { - "description": "[1.0] is invalid", - "data": [1.0], - "valid": false - } - ] - }, - { - "description": "const with {\"a\": false} does not match {\"a\": 0}", - "schema": {"const": {"a": false}}, - "tests": [ - { - "description": "{\"a\": false} is valid", - "data": {"a": false}, - "valid": true - }, - { - "description": "{\"a\": 0} is invalid", - "data": {"a": 0}, - "valid": false - }, - { - "description": "{\"a\": 0.0} is invalid", - "data": {"a": 0.0}, - "valid": false - } - ] - }, - { - "description": "const with {\"a\": true} does not match {\"a\": 1}", - "schema": {"const": {"a": true}}, - "tests": [ - { - "description": "{\"a\": true} is valid", - "data": {"a": true}, - "valid": true - }, - { - "description": "{\"a\": 1} is invalid", - "data": {"a": 1}, - "valid": false - }, - { - "description": "{\"a\": 1.0} is invalid", - "data": {"a": 1.0}, - "valid": false - } - ] - }, - { - "description": "const with 0 does not match other zero-like types", - "schema": {"const": 0}, - "tests": [ - { - "description": "false is invalid", - "data": false, - "valid": false - }, - { - "description": "integer zero is valid", - "data": 0, - "valid": true - }, - { - "description": "float zero is valid", - "data": 0.0, - "valid": true - }, - { - "description": "empty object is invalid", - "data": {}, - "valid": false - }, - { - "description": "empty array is invalid", - "data": [], - "valid": false - }, - { - "description": "empty string is invalid", - "data": "", - "valid": false - } - ] - }, - { - "description": "const with 1 does not match true", - "schema": {"const": 1}, - "tests": [ - { - "description": "true is invalid", - "data": true, - "valid": false - }, - { - "description": "integer one is valid", - "data": 1, - "valid": true - }, - { - "description": "float one is valid", - "data": 1.0, - "valid": true - } - ] - }, - { - "description": "const with -2.0 matches integer and float types", - "schema": {"const": -2.0}, - "tests": [ - { - "description": "integer -2 is valid", - "data": -2, - "valid": true - }, - { - "description": "integer 2 is invalid", - "data": 2, - "valid": false - }, - { - "description": "float -2.0 is valid", - "data": -2.0, - "valid": true - }, - { - "description": "float 2.0 is invalid", - "data": 2.0, - "valid": false - }, - { - "description": "float -2.00001 is invalid", - "data": -2.00001, - "valid": false - } - ] - }, - { - "description": "float and integers are equal up to 64-bit representation limits", - "schema": {"const": 9007199254740992}, - "tests": [ - { - "description": "integer is valid", - "data": 9007199254740992, - "valid": true - }, - { - "description": "integer minus one is invalid", - "data": 9007199254740991, - "valid": false - }, - { - "description": "float is valid", - "data": 9007199254740992.0, - "valid": true - }, - { - "description": "float minus one is invalid", - "data": 9007199254740991.0, - "valid": false - } - ] - }, - { - "description": "nul characters in strings", - "schema": { "const": "hello\u0000there" }, - "tests": [ - { - "description": "match string with nul", - "data": "hello\u0000there", - "valid": true - }, - { - "description": "do not match string lacking nul", - "data": "hellothere", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/contains.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/contains.json deleted file mode 100644 index bd93654f..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/contains.json +++ /dev/null @@ -1,144 +0,0 @@ -[ - { - "description": "contains keyword validation", - "schema": { - "contains": {"minimum": 5} - }, - "tests": [ - { - "description": "array with item matching schema (5) is valid", - "data": [3, 4, 5], - "valid": true - }, - { - "description": "array with item matching schema (6) is valid", - "data": [3, 4, 6], - "valid": true - }, - { - "description": "array with two items matching schema (5, 6) is valid", - "data": [3, 4, 5, 6], - "valid": true - }, - { - "description": "array without items matching schema is invalid", - "data": [2, 3, 4], - "valid": false - }, - { - "description": "empty array is invalid", - "data": [], - "valid": false - }, - { - "description": "not array is valid", - "data": {}, - "valid": true - } - ] - }, - { - "description": "contains keyword with const keyword", - "schema": { - "contains": { "const": 5 } - }, - "tests": [ - { - "description": "array with item 5 is valid", - "data": [3, 4, 5], - "valid": true - }, - { - "description": "array with two items 5 is valid", - "data": [3, 4, 5, 5], - "valid": true - }, - { - "description": "array without item 5 is invalid", - "data": [1, 2, 3, 4], - "valid": false - } - ] - }, - { - "description": "contains keyword with boolean schema true", - "schema": {"contains": true}, - "tests": [ - { - "description": "any non-empty array is valid", - "data": ["foo"], - "valid": true - }, - { - "description": "empty array is invalid", - "data": [], - "valid": false - } - ] - }, - { - "description": "contains keyword with boolean schema false", - "schema": {"contains": false}, - "tests": [ - { - "description": "any non-empty array is invalid", - "data": ["foo"], - "valid": false - }, - { - "description": "empty array is invalid", - "data": [], - "valid": false - }, - { - "description": "non-arrays are valid", - "data": "contains does not apply to strings", - "valid": true - } - ] - }, - { - "description": "items + contains", - "schema": { - "items": { "multipleOf": 2 }, - "contains": { "multipleOf": 3 } - }, - "tests": [ - { - "description": "matches items, does not match contains", - "data": [ 2, 4, 8 ], - "valid": false - }, - { - "description": "does not match items, matches contains", - "data": [ 3, 6, 9 ], - "valid": false - }, - { - "description": "matches both items and contains", - "data": [ 6, 12 ], - "valid": true - }, - { - "description": "matches neither items nor contains", - "data": [ 1, 5 ], - "valid": false - } - ] - }, - { - "description": "contains with null instance elements", - "schema": { - "contains": { - "type": "null" - } - }, - "tests": [ - { - "description": "allows null items", - "data": [ null ], - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/default.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/default.json deleted file mode 100644 index 289a9b66..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/default.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "description": "invalid type for default", - "schema": { - "properties": { - "foo": { - "type": "integer", - "default": [] - } - } - }, - "tests": [ - { - "description": "valid when property is specified", - "data": {"foo": 13}, - "valid": true - }, - { - "description": "still valid when the invalid default is used", - "data": {}, - "valid": true - } - ] - }, - { - "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 - }, - { - "description": "still valid when the invalid default is used", - "data": {}, - "valid": true - } - ] - }, - { - "description": "the default keyword does not do anything if the property is missing", - "schema": { - "type": "object", - "properties": { - "alpha": { - "type": "number", - "maximum": 3, - "default": 5 - } - } - }, - "tests": [ - { - "description": "an explicit property value is checked against maximum (passing)", - "data": { "alpha": 1 }, - "valid": true - }, - { - "description": "an explicit property value is checked against maximum (failing)", - "data": { "alpha": 5 }, - "valid": false - }, - { - "description": "missing properties are not filled in with the default", - "data": {}, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/definitions.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/definitions.json deleted file mode 100644 index d772fde3..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/definitions.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "description": "validate definition against metaschema", - "schema": {"$ref": "http://json-schema.org/draft-06/schema#"}, - "tests": [ - { - "description": "valid definition schema", - "data": { - "definitions": { - "foo": {"type": "integer"} - } - }, - "valid": true - }, - { - "description": "invalid definition schema", - "data": { - "definitions": { - "foo": {"type": 1} - } - }, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/dependencies.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/dependencies.json deleted file mode 100644 index c0bd809f..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/dependencies.json +++ /dev/null @@ -1,286 +0,0 @@ -[ - { - "description": "dependencies", - "schema": { - "dependencies": {"bar": ["foo"]} - }, - "tests": [ - { - "description": "neither", - "data": {}, - "valid": true - }, - { - "description": "nondependant", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "with dependency", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "missing dependency", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "ignores arrays", - "data": ["bar"], - "valid": true - }, - { - "description": "ignores strings", - "data": "foobar", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "dependencies with empty array", - "schema": { - "dependencies": {"bar": []} - }, - "tests": [ - { - "description": "empty object", - "data": {}, - "valid": true - }, - { - "description": "object with one property", - "data": {"bar": 2}, - "valid": true - }, - { - "description": "non-object is valid", - "data": 1, - "valid": true - } - ] - }, - { - "description": "multiple dependencies", - "schema": { - "dependencies": {"quux": ["foo", "bar"]} - }, - "tests": [ - { - "description": "neither", - "data": {}, - "valid": true - }, - { - "description": "nondependants", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "with dependencies", - "data": {"foo": 1, "bar": 2, "quux": 3}, - "valid": true - }, - { - "description": "missing dependency", - "data": {"foo": 1, "quux": 2}, - "valid": false - }, - { - "description": "missing other dependency", - "data": {"bar": 1, "quux": 2}, - "valid": false - }, - { - "description": "missing both dependencies", - "data": {"quux": 1}, - "valid": false - } - ] - }, - { - "description": "multiple dependencies subschema", - "schema": { - "dependencies": { - "bar": { - "properties": { - "foo": {"type": "integer"}, - "bar": {"type": "integer"} - } - } - } - }, - "tests": [ - { - "description": "valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "no dependency", - "data": {"foo": "quux"}, - "valid": true - }, - { - "description": "wrong type", - "data": {"foo": "quux", "bar": 2}, - "valid": false - }, - { - "description": "wrong type other", - "data": {"foo": 2, "bar": "quux"}, - "valid": false - }, - { - "description": "wrong type both", - "data": {"foo": "quux", "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "dependencies with boolean subschemas", - "schema": { - "dependencies": { - "foo": true, - "bar": false - } - }, - "tests": [ - { - "description": "object with property having schema true is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "object with property having schema false is invalid", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "object with both properties is invalid", - "data": {"foo": 1, "bar": 2}, - "valid": false - }, - { - "description": "empty object is valid", - "data": {}, - "valid": true - } - ] - }, - { - "description": "dependencies with escaped characters", - "schema": { - "dependencies": { - "foo\nbar": ["foo\rbar"], - "foo\tbar": { - "minProperties": 4 - }, - "foo'bar": {"required": ["foo\"bar"]}, - "foo\"bar": ["foo'bar"] - } - }, - "tests": [ - { - "description": "valid object 1", - "data": { - "foo\nbar": 1, - "foo\rbar": 2 - }, - "valid": true - }, - { - "description": "valid object 2", - "data": { - "foo\tbar": 1, - "a": 2, - "b": 3, - "c": 4 - }, - "valid": true - }, - { - "description": "valid object 3", - "data": { - "foo'bar": 1, - "foo\"bar": 2 - }, - "valid": true - }, - { - "description": "invalid object 1", - "data": { - "foo\nbar": 1, - "foo": 2 - }, - "valid": false - }, - { - "description": "invalid object 2", - "data": { - "foo\tbar": 1, - "a": 2 - }, - "valid": false - }, - { - "description": "invalid object 3", - "data": { - "foo'bar": 1 - }, - "valid": false - }, - { - "description": "invalid object 4", - "data": { - "foo\"bar": 2 - }, - "valid": false - } - ] - }, - { - "description": "dependent subschema incompatible with root", - "schema": { - "properties": { - "foo": {} - }, - "dependencies": { - "foo": { - "properties": { - "bar": {} - }, - "additionalProperties": false - } - } - }, - "tests": [ - { - "description": "matches root", - "data": {"foo": 1}, - "valid": false - }, - { - "description": "matches dependency", - "data": {"bar": 1}, - "valid": true - }, - { - "description": "matches both", - "data": {"foo": 1, "bar": 2}, - "valid": false - }, - { - "description": "no dependency", - "data": {"baz": 1}, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/enum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/enum.json deleted file mode 100644 index ce43acc0..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/enum.json +++ /dev/null @@ -1,320 +0,0 @@ -[ - { - "description": "simple enum validation", - "schema": {"enum": [1, 2, 3]}, - "tests": [ - { - "description": "one of the enum is valid", - "data": 1, - "valid": true - }, - { - "description": "something else is invalid", - "data": 4, - "valid": false - } - ] - }, - { - "description": "heterogeneous enum validation", - "schema": {"enum": [6, "foo", [], true, {"foo": 12}]}, - "tests": [ - { - "description": "one of the enum is valid", - "data": [], - "valid": true - }, - { - "description": "something else is invalid", - "data": null, - "valid": false - }, - { - "description": "objects are deep compared", - "data": {"foo": false}, - "valid": false - }, - { - "description": "valid object matches", - "data": {"foo": 12}, - "valid": true - }, - { - "description": "extra properties in object is invalid", - "data": {"foo": 12, "boo": 42}, - "valid": false - } - ] - }, - { - "description": "heterogeneous enum-with-null validation", - "schema": { "enum": [6, null] }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "number is valid", - "data": 6, - "valid": true - }, - { - "description": "something else is invalid", - "data": "test", - "valid": false - } - ] - }, - { - "description": "enums in properties", - "schema": { - "type":"object", - "properties": { - "foo": {"enum":["foo"]}, - "bar": {"enum":["bar"]} - }, - "required": ["bar"] - }, - "tests": [ - { - "description": "both properties are valid", - "data": {"foo":"foo", "bar":"bar"}, - "valid": true - }, - { - "description": "wrong foo value", - "data": {"foo":"foot", "bar":"bar"}, - "valid": false - }, - { - "description": "wrong bar value", - "data": {"foo":"foo", "bar":"bart"}, - "valid": false - }, - { - "description": "missing optional property is valid", - "data": {"bar":"bar"}, - "valid": true - }, - { - "description": "missing required property is invalid", - "data": {"foo":"foo"}, - "valid": false - }, - { - "description": "missing all properties is invalid", - "data": {}, - "valid": false - } - ] - }, - { - "description": "enum with escaped characters", - "schema": { - "enum": ["foo\nbar", "foo\rbar"] - }, - "tests": [ - { - "description": "member 1 is valid", - "data": "foo\nbar", - "valid": true - }, - { - "description": "member 2 is valid", - "data": "foo\rbar", - "valid": true - }, - { - "description": "another string is invalid", - "data": "abc", - "valid": false - } - ] - }, - { - "description": "enum with false does not match 0", - "schema": {"enum": [false]}, - "tests": [ - { - "description": "false is valid", - "data": false, - "valid": true - }, - { - "description": "integer zero is invalid", - "data": 0, - "valid": false - }, - { - "description": "float zero is invalid", - "data": 0.0, - "valid": false - } - ] - }, - { - "description": "enum with [false] does not match [0]", - "schema": {"enum": [[false]]}, - "tests": [ - { - "description": "[false] is valid", - "data": [false], - "valid": true - }, - { - "description": "[0] is invalid", - "data": [0], - "valid": false - }, - { - "description": "[0.0] is invalid", - "data": [0.0], - "valid": false - } - ] - }, - { - "description": "enum with true does not match 1", - "schema": {"enum": [true]}, - "tests": [ - { - "description": "true is valid", - "data": true, - "valid": true - }, - { - "description": "integer one is invalid", - "data": 1, - "valid": false - }, - { - "description": "float one is invalid", - "data": 1.0, - "valid": false - } - ] - }, - { - "description": "enum with [true] does not match [1]", - "schema": {"enum": [[true]]}, - "tests": [ - { - "description": "[true] is valid", - "data": [true], - "valid": true - }, - { - "description": "[1] is invalid", - "data": [1], - "valid": false - }, - { - "description": "[1.0] is invalid", - "data": [1.0], - "valid": false - } - ] - }, - { - "description": "enum with 0 does not match false", - "schema": {"enum": [0]}, - "tests": [ - { - "description": "false is invalid", - "data": false, - "valid": false - }, - { - "description": "integer zero is valid", - "data": 0, - "valid": true - }, - { - "description": "float zero is valid", - "data": 0.0, - "valid": true - } - ] - }, - { - "description": "enum with [0] does not match [false]", - "schema": {"enum": [[0]]}, - "tests": [ - { - "description": "[false] is invalid", - "data": [false], - "valid": false - }, - { - "description": "[0] is valid", - "data": [0], - "valid": true - }, - { - "description": "[0.0] is valid", - "data": [0.0], - "valid": true - } - ] - }, - { - "description": "enum with 1 does not match true", - "schema": {"enum": [1]}, - "tests": [ - { - "description": "true is invalid", - "data": true, - "valid": false - }, - { - "description": "integer one is valid", - "data": 1, - "valid": true - }, - { - "description": "float one is valid", - "data": 1.0, - "valid": true - } - ] - }, - { - "description": "enum with [1] does not match [true]", - "schema": {"enum": [[1]]}, - "tests": [ - { - "description": "[true] is invalid", - "data": [true], - "valid": false - }, - { - "description": "[1] is valid", - "data": [1], - "valid": true - }, - { - "description": "[1.0] is valid", - "data": [1.0], - "valid": true - } - ] - }, - { - "description": "nul characters in strings", - "schema": { "enum": [ "hello\u0000there" ] }, - "tests": [ - { - "description": "match string with nul", - "data": "hello\u0000there", - "valid": true - }, - { - "description": "do not match string lacking nul", - "data": "hellothere", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/exclusiveMaximum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/exclusiveMaximum.json deleted file mode 100644 index dc3cd709..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/exclusiveMaximum.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "description": "exclusiveMaximum validation", - "schema": { - "exclusiveMaximum": 3.0 - }, - "tests": [ - { - "description": "below the exclusiveMaximum is valid", - "data": 2.2, - "valid": true - }, - { - "description": "boundary point is invalid", - "data": 3.0, - "valid": false - }, - { - "description": "above the exclusiveMaximum is invalid", - "data": 3.5, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/exclusiveMinimum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/exclusiveMinimum.json deleted file mode 100644 index b38d7ece..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/exclusiveMinimum.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "description": "exclusiveMinimum validation", - "schema": { - "exclusiveMinimum": 1.1 - }, - "tests": [ - { - "description": "above the exclusiveMinimum is valid", - "data": 1.2, - "valid": true - }, - { - "description": "boundary point is invalid", - "data": 1.1, - "valid": false - }, - { - "description": "below the exclusiveMinimum is invalid", - "data": 0.6, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/format.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/format.json deleted file mode 100644 index 2df2a9f0..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/format.json +++ /dev/null @@ -1,326 +0,0 @@ -[ - { - "description": "email format", - "schema": { "format": "email" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "ipv4 format", - "schema": { "format": "ipv4" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "ipv6 format", - "schema": { "format": "ipv6" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "hostname format", - "schema": { "format": "hostname" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "date-time format", - "schema": { "format": "date-time" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "json-pointer format", - "schema": { "format": "json-pointer" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "uri format", - "schema": { "format": "uri" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "uri-reference format", - "schema": { "format": "uri-reference" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - }, - { - "description": "uri-template format", - "schema": { "format": "uri-template" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/infinite-loop-detection.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/infinite-loop-detection.json deleted file mode 100644 index f98c74fc..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/infinite-loop-detection.json +++ /dev/null @@ -1,36 +0,0 @@ -[ - { - "description": "evaluating the same schema location against the same data location twice is not a sign of an infinite loop", - "schema": { - "definitions": { - "int": { "type": "integer" } - }, - "allOf": [ - { - "properties": { - "foo": { - "$ref": "#/definitions/int" - } - } - }, - { - "additionalProperties": { - "$ref": "#/definitions/int" - } - } - ] - }, - "tests": [ - { - "description": "passing case", - "data": { "foo": 1 }, - "valid": true - }, - { - "description": "failing case", - "data": { "foo": "a string" }, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/items.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/items.json deleted file mode 100644 index 7ed6781b..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/items.json +++ /dev/null @@ -1,282 +0,0 @@ -[ - { - "description": "a schema given for items", - "schema": { - "items": {"type": "integer"} - }, - "tests": [ - { - "description": "valid items", - "data": [ 1, 2, 3 ], - "valid": true - }, - { - "description": "wrong type of items", - "data": [1, "x"], - "valid": false - }, - { - "description": "ignores non-arrays", - "data": {"foo" : "bar"}, - "valid": true - }, - { - "description": "JavaScript pseudo-array is valid", - "data": { - "0": "invalid", - "length": 1 - }, - "valid": true - } - ] - }, - { - "description": "an array of schemas for items", - "schema": { - "items": [ - {"type": "integer"}, - {"type": "string"} - ] - }, - "tests": [ - { - "description": "correct types", - "data": [ 1, "foo" ], - "valid": true - }, - { - "description": "wrong types", - "data": [ "foo", 1 ], - "valid": false - }, - { - "description": "incomplete array of items", - "data": [ 1 ], - "valid": true - }, - { - "description": "array with additional items", - "data": [ 1, "foo", true ], - "valid": true - }, - { - "description": "empty array", - "data": [ ], - "valid": true - }, - { - "description": "JavaScript pseudo-array is valid", - "data": { - "0": "invalid", - "1": "valid", - "length": 2 - }, - "valid": true - } - ] - }, - { - "description": "items with boolean schema (true)", - "schema": {"items": true}, - "tests": [ - { - "description": "any array is valid", - "data": [ 1, "foo", true ], - "valid": true - }, - { - "description": "empty array is valid", - "data": [], - "valid": true - } - ] - }, - { - "description": "items with boolean schema (false)", - "schema": {"items": false}, - "tests": [ - { - "description": "any non-empty array is invalid", - "data": [ 1, "foo", true ], - "valid": false - }, - { - "description": "empty array is valid", - "data": [], - "valid": true - } - ] - }, - { - "description": "items with boolean schemas", - "schema": { - "items": [true, false] - }, - "tests": [ - { - "description": "array with one item is valid", - "data": [ 1 ], - "valid": true - }, - { - "description": "array with two items is invalid", - "data": [ 1, "foo" ], - "valid": false - }, - { - "description": "empty array is valid", - "data": [], - "valid": true - } - ] - }, - { - "description": "items and subitems", - "schema": { - "definitions": { - "item": { - "type": "array", - "additionalItems": false, - "items": [ - { "$ref": "#/definitions/sub-item" }, - { "$ref": "#/definitions/sub-item" } - ] - }, - "sub-item": { - "type": "object", - "required": ["foo"] - } - }, - "type": "array", - "additionalItems": false, - "items": [ - { "$ref": "#/definitions/item" }, - { "$ref": "#/definitions/item" }, - { "$ref": "#/definitions/item" } - ] - }, - "tests": [ - { - "description": "valid items", - "data": [ - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": true - }, - { - "description": "too many items", - "data": [ - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": false - }, - { - "description": "too many sub-items", - "data": [ - [ {"foo": null}, {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": false - }, - { - "description": "wrong item", - "data": [ - {"foo": null}, - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": false - }, - { - "description": "wrong sub-item", - "data": [ - [ {}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ], - [ {"foo": null}, {"foo": null} ] - ], - "valid": false - }, - { - "description": "fewer items is valid", - "data": [ - [ {"foo": null} ], - [ {"foo": null} ] - ], - "valid": true - } - ] - }, - { - "description": "nested items", - "schema": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number" - } - } - } - } - }, - "tests": [ - { - "description": "valid nested array", - "data": [[[[1]], [[2],[3]]], [[[4], [5], [6]]]], - "valid": true - }, - { - "description": "nested array with invalid type", - "data": [[[["1"]], [[2],[3]]], [[[4], [5], [6]]]], - "valid": false - }, - { - "description": "not deep enough", - "data": [[[1], [2],[3]], [[4], [5], [6]]], - "valid": false - } - ] - }, - { - "description": "single-form items with null instance elements", - "schema": { - "items": { - "type": "null" - } - }, - "tests": [ - { - "description": "allows null elements", - "data": [ null ], - "valid": true - } - ] - }, - { - "description": "array-form items with null instance elements", - "schema": { - "items": [ - { - "type": "null" - } - ] - }, - "tests": [ - { - "description": "allows null elements", - "data": [ null ], - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxItems.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxItems.json deleted file mode 100644 index f0c36ab2..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxItems.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "description": "maxItems validation", - "schema": {"maxItems": 2}, - "tests": [ - { - "description": "shorter is valid", - "data": [1], - "valid": true - }, - { - "description": "exact length is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "too long is invalid", - "data": [1, 2, 3], - "valid": false - }, - { - "description": "ignores non-arrays", - "data": "foobar", - "valid": true - } - ] - }, - { - "description": "maxItems validation with a decimal", - "schema": {"maxItems": 2.0}, - "tests": [ - { - "description": "shorter is valid", - "data": [1], - "valid": true - }, - { - "description": "too long is invalid", - "data": [1, 2, 3], - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxLength.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxLength.json deleted file mode 100644 index be60c540..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxLength.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "description": "maxLength validation", - "schema": {"maxLength": 2}, - "tests": [ - { - "description": "shorter is valid", - "data": "f", - "valid": true - }, - { - "description": "exact length is valid", - "data": "fo", - "valid": true - }, - { - "description": "too long is invalid", - "data": "foo", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 100, - "valid": true - }, - { - "description": "two graphemes is long enough", - "data": "\uD83D\uDCA9\uD83D\uDCA9", - "valid": true - } - ] - }, - { - "description": "maxLength validation with a decimal", - "schema": {"maxLength": 2.0}, - "tests": [ - { - "description": "shorter is valid", - "data": "f", - "valid": true - }, - { - "description": "too long is invalid", - "data": "foo", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxProperties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxProperties.json deleted file mode 100644 index acec1420..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maxProperties.json +++ /dev/null @@ -1,70 +0,0 @@ -[ - { - "description": "maxProperties validation", - "schema": {"maxProperties": 2}, - "tests": [ - { - "description": "shorter is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "exact length is valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "too long is invalid", - "data": {"foo": 1, "bar": 2, "baz": 3}, - "valid": false - }, - { - "description": "ignores arrays", - "data": [1, 2, 3], - "valid": true - }, - { - "description": "ignores strings", - "data": "foobar", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "maxProperties validation with a decimal", - "schema": {"maxProperties": 2.0}, - "tests": [ - { - "description": "shorter is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "too long is invalid", - "data": {"foo": 1, "bar": 2, "baz": 3}, - "valid": false - } - ] - }, - { - "description": "maxProperties = 0 means the object is empty", - "schema": { "maxProperties": 0 }, - "tests": [ - { - "description": "no properties is valid", - "data": {}, - "valid": true - }, - { - "description": "one property is invalid", - "data": { "foo": 1 }, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maximum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maximum.json deleted file mode 100644 index 6844a39e..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/maximum.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "description": "maximum validation", - "schema": {"maximum": 3.0}, - "tests": [ - { - "description": "below the maximum is valid", - "data": 2.6, - "valid": true - }, - { - "description": "boundary point is valid", - "data": 3.0, - "valid": true - }, - { - "description": "above the maximum is invalid", - "data": 3.5, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - }, - { - "description": "maximum validation with unsigned integer", - "schema": {"maximum": 300}, - "tests": [ - { - "description": "below the maximum is invalid", - "data": 299.97, - "valid": true - }, - { - "description": "boundary point integer is valid", - "data": 300, - "valid": true - }, - { - "description": "boundary point float is valid", - "data": 300.00, - "valid": true - }, - { - "description": "above the maximum is invalid", - "data": 300.5, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minItems.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minItems.json deleted file mode 100644 index d3b18720..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minItems.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "description": "minItems validation", - "schema": {"minItems": 1}, - "tests": [ - { - "description": "longer is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "exact length is valid", - "data": [1], - "valid": true - }, - { - "description": "too short is invalid", - "data": [], - "valid": false - }, - { - "description": "ignores non-arrays", - "data": "", - "valid": true - } - ] - }, - { - "description": "minItems validation with a decimal", - "schema": {"minItems": 1.0}, - "tests": [ - { - "description": "longer is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "too short is invalid", - "data": [], - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minLength.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minLength.json deleted file mode 100644 index 23c68fe3..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minLength.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "description": "minLength validation", - "schema": {"minLength": 2}, - "tests": [ - { - "description": "longer is valid", - "data": "foo", - "valid": true - }, - { - "description": "exact length is valid", - "data": "fo", - "valid": true - }, - { - "description": "too short is invalid", - "data": "f", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 1, - "valid": true - }, - { - "description": "one grapheme is not long enough", - "data": "\uD83D\uDCA9", - "valid": false - } - ] - }, - { - "description": "minLength validation with a decimal", - "schema": {"minLength": 2.0}, - "tests": [ - { - "description": "longer is valid", - "data": "foo", - "valid": true - }, - { - "description": "too short is invalid", - "data": "f", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minProperties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minProperties.json deleted file mode 100644 index 9f74f789..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minProperties.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "description": "minProperties validation", - "schema": {"minProperties": 1}, - "tests": [ - { - "description": "longer is valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "exact length is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "too short is invalid", - "data": {}, - "valid": false - }, - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores strings", - "data": "", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "minProperties validation with a decimal", - "schema": {"minProperties": 1.0}, - "tests": [ - { - "description": "longer is valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "too short is invalid", - "data": {}, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minimum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minimum.json deleted file mode 100644 index 21ae50e0..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/minimum.json +++ /dev/null @@ -1,69 +0,0 @@ -[ - { - "description": "minimum validation", - "schema": {"minimum": 1.1}, - "tests": [ - { - "description": "above the minimum is valid", - "data": 2.6, - "valid": true - }, - { - "description": "boundary point is valid", - "data": 1.1, - "valid": true - }, - { - "description": "below the minimum is invalid", - "data": 0.6, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - }, - { - "description": "minimum validation with signed integer", - "schema": {"minimum": -2}, - "tests": [ - { - "description": "negative above the minimum is valid", - "data": -1, - "valid": true - }, - { - "description": "positive above the minimum is valid", - "data": 0, - "valid": true - }, - { - "description": "boundary point is valid", - "data": -2, - "valid": true - }, - { - "description": "boundary point with float is valid", - "data": -2.0, - "valid": true - }, - { - "description": "float below the minimum is invalid", - "data": -2.0001, - "valid": false - }, - { - "description": "int below the minimum is invalid", - "data": -3, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/multipleOf.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/multipleOf.json deleted file mode 100644 index e606979b..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/multipleOf.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "description": "by int", - "schema": {"multipleOf": 2}, - "tests": [ - { - "description": "int by int", - "data": 10, - "valid": true - }, - { - "description": "int by int fail", - "data": 7, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "by number", - "schema": {"multipleOf": 1.5}, - "tests": [ - { - "description": "zero is multiple of anything", - "data": 0, - "valid": true - }, - { - "description": "4.5 is multiple of 1.5", - "data": 4.5, - "valid": true - }, - { - "description": "35 is not multiple of 1.5", - "data": 35, - "valid": false - } - ] - }, - { - "description": "by small number", - "schema": {"multipleOf": 0.0001}, - "tests": [ - { - "description": "0.0075 is multiple of 0.0001", - "data": 0.0075, - "valid": true - }, - { - "description": "0.00751 is not multiple of 0.0001", - "data": 0.00751, - "valid": false - } - ] - }, - { - "description": "float division = inf", - "schema": {"type": "integer", "multipleOf": 0.123456789}, - "tests": [ - { - "description": "always invalid, but naive implementations may raise an overflow error", - "data": 1e308, - "valid": false - } - ] - }, - { - "description": "small multiple of large integer", - "schema": {"type": "integer", "multipleOf": 1e-8}, - "tests": [ - { - "description": "any integer is a multiple of 1e-8", - "data": 12391239123, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/not.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/not.json deleted file mode 100644 index b46c4ed0..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/not.json +++ /dev/null @@ -1,259 +0,0 @@ -[ - { - "description": "not", - "schema": { - "not": {"type": "integer"} - }, - "tests": [ - { - "description": "allowed", - "data": "foo", - "valid": true - }, - { - "description": "disallowed", - "data": 1, - "valid": false - } - ] - }, - { - "description": "not multiple types", - "schema": { - "not": {"type": ["integer", "boolean"]} - }, - "tests": [ - { - "description": "valid", - "data": "foo", - "valid": true - }, - { - "description": "mismatch", - "data": 1, - "valid": false - }, - { - "description": "other mismatch", - "data": true, - "valid": false - } - ] - }, - { - "description": "not more complex schema", - "schema": { - "not": { - "type": "object", - "properties": { - "foo": { - "type": "string" - } - } - } - }, - "tests": [ - { - "description": "match", - "data": 1, - "valid": true - }, - { - "description": "other match", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "mismatch", - "data": {"foo": "bar"}, - "valid": false - } - ] - }, - { - "description": "forbidden property", - "schema": { - "properties": { - "foo": { - "not": {} - } - } - }, - "tests": [ - { - "description": "property present", - "data": {"foo": 1, "bar": 2}, - "valid": false - }, - { - "description": "property absent", - "data": {"bar": 1, "baz": 2}, - "valid": true - } - ] - }, - { - "description": "forbid everything with empty schema", - "schema": { "not": {} }, - "tests": [ - { - "description": "number is invalid", - "data": 1, - "valid": false - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - }, - { - "description": "boolean true is invalid", - "data": true, - "valid": false - }, - { - "description": "boolean false is invalid", - "data": false, - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - }, - { - "description": "object is invalid", - "data": {"foo": "bar"}, - "valid": false - }, - { - "description": "empty object is invalid", - "data": {}, - "valid": false - }, - { - "description": "array is invalid", - "data": ["foo"], - "valid": false - }, - { - "description": "empty array is invalid", - "data": [], - "valid": false - } - ] - }, - { - "description": "forbid everything with boolean schema true", - "schema": { "not": true }, - "tests": [ - { - "description": "number is invalid", - "data": 1, - "valid": false - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - }, - { - "description": "boolean true is invalid", - "data": true, - "valid": false - }, - { - "description": "boolean false is invalid", - "data": false, - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - }, - { - "description": "object is invalid", - "data": {"foo": "bar"}, - "valid": false - }, - { - "description": "empty object is invalid", - "data": {}, - "valid": false - }, - { - "description": "array is invalid", - "data": ["foo"], - "valid": false - }, - { - "description": "empty array is invalid", - "data": [], - "valid": false - } - ] - }, - { - "description": "allow everything with boolean schema false", - "schema": { "not": false }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "string is valid", - "data": "foo", - "valid": true - }, - { - "description": "boolean true is valid", - "data": true, - "valid": true - }, - { - "description": "boolean false is valid", - "data": false, - "valid": true - }, - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "object is valid", - "data": {"foo": "bar"}, - "valid": true - }, - { - "description": "empty object is valid", - "data": {}, - "valid": true - }, - { - "description": "array is valid", - "data": ["foo"], - "valid": true - }, - { - "description": "empty array is valid", - "data": [], - "valid": true - } - ] - }, - { - "description": "double negation", - "schema": { "not": { "not": {} } }, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/oneOf.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/oneOf.json deleted file mode 100644 index c30a65c0..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/oneOf.json +++ /dev/null @@ -1,274 +0,0 @@ -[ - { - "description": "oneOf", - "schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] - }, - "tests": [ - { - "description": "first oneOf valid", - "data": 1, - "valid": true - }, - { - "description": "second oneOf valid", - "data": 2.5, - "valid": true - }, - { - "description": "both oneOf valid", - "data": 3, - "valid": false - }, - { - "description": "neither oneOf valid", - "data": 1.5, - "valid": false - } - ] - }, - { - "description": "oneOf with base schema", - "schema": { - "type": "string", - "oneOf" : [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] - }, - "tests": [ - { - "description": "mismatch base schema", - "data": 3, - "valid": false - }, - { - "description": "one oneOf valid", - "data": "foobar", - "valid": true - }, - { - "description": "both oneOf valid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "oneOf with boolean schemas, all true", - "schema": {"oneOf": [true, true, true]}, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "oneOf with boolean schemas, one true", - "schema": {"oneOf": [true, false, false]}, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "oneOf with boolean schemas, more than one true", - "schema": {"oneOf": [true, true, false]}, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "oneOf with boolean schemas, all false", - "schema": {"oneOf": [false, false, false]}, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "oneOf complex types", - "schema": { - "oneOf": [ - { - "properties": { - "bar": {"type": "integer"} - }, - "required": ["bar"] - }, - { - "properties": { - "foo": {"type": "string"} - }, - "required": ["foo"] - } - ] - }, - "tests": [ - { - "description": "first oneOf valid (complex)", - "data": {"bar": 2}, - "valid": true - }, - { - "description": "second oneOf valid (complex)", - "data": {"foo": "baz"}, - "valid": true - }, - { - "description": "both oneOf valid (complex)", - "data": {"foo": "baz", "bar": 2}, - "valid": false - }, - { - "description": "neither oneOf valid (complex)", - "data": {"foo": 2, "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "oneOf with empty schema", - "schema": { - "oneOf": [ - { "type": "number" }, - {} - ] - }, - "tests": [ - { - "description": "one valid - valid", - "data": "foo", - "valid": true - }, - { - "description": "both valid - invalid", - "data": 123, - "valid": false - } - ] - }, - { - "description": "oneOf with required", - "schema": { - "type": "object", - "oneOf": [ - { "required": ["foo", "bar"] }, - { "required": ["foo", "baz"] } - ] - }, - "tests": [ - { - "description": "both invalid - invalid", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "first valid - valid", - "data": {"foo": 1, "bar": 2}, - "valid": true - }, - { - "description": "second valid - valid", - "data": {"foo": 1, "baz": 3}, - "valid": true - }, - { - "description": "both valid - invalid", - "data": {"foo": 1, "bar": 2, "baz" : 3}, - "valid": false - } - ] - }, - { - "description": "oneOf with missing optional property", - "schema": { - "oneOf": [ - { - "properties": { - "bar": true, - "baz": true - }, - "required": ["bar"] - }, - { - "properties": { - "foo": true - }, - "required": ["foo"] - } - ] - }, - "tests": [ - { - "description": "first oneOf valid", - "data": {"bar": 8}, - "valid": true - }, - { - "description": "second oneOf valid", - "data": {"foo": "foo"}, - "valid": true - }, - { - "description": "both oneOf valid", - "data": {"foo": "foo", "bar": 8}, - "valid": false - }, - { - "description": "neither oneOf valid", - "data": {"baz": "quux"}, - "valid": false - } - ] - }, - { - "description": "nested oneOf, to check validation semantics", - "schema": { - "oneOf": [ - { - "oneOf": [ - { - "type": "null" - } - ] - } - ] - }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "anything non-null is invalid", - "data": 123, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/bignum.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/bignum.json deleted file mode 100644 index 94b4a4e6..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/bignum.json +++ /dev/null @@ -1,93 +0,0 @@ -[ - { - "description": "integer", - "schema": { "type": "integer" }, - "tests": [ - { - "description": "a bignum is an integer", - "data": 12345678910111213141516171819202122232425262728293031, - "valid": true - }, - { - "description": "a negative bignum is an integer", - "data": -12345678910111213141516171819202122232425262728293031, - "valid": true - } - ] - }, - { - "description": "number", - "schema": { "type": "number" }, - "tests": [ - { - "description": "a bignum is a number", - "data": 98249283749234923498293171823948729348710298301928331, - "valid": true - }, - { - "description": "a negative bignum is a number", - "data": -98249283749234923498293171823948729348710298301928331, - "valid": true - } - ] - }, - { - "description": "string", - "schema": { "type": "string" }, - "tests": [ - { - "description": "a bignum is not a string", - "data": 98249283749234923498293171823948729348710298301928331, - "valid": false - } - ] - }, - { - "description": "maximum integer comparison", - "schema": { "maximum": 18446744073709551615 }, - "tests": [ - { - "description": "comparison works for high numbers", - "data": 18446744073709551600, - "valid": true - } - ] - }, - { - "description": "float comparison with high precision", - "schema": { - "exclusiveMaximum": 972783798187987123879878123.18878137 - }, - "tests": [ - { - "description": "comparison works for high numbers", - "data": 972783798187987123879878123.188781371, - "valid": false - } - ] - }, - { - "description": "minimum integer comparison", - "schema": { "minimum": -18446744073709551615 }, - "tests": [ - { - "description": "comparison works for very negative numbers", - "data": -18446744073709551600, - "valid": true - } - ] - }, - { - "description": "float comparison with high precision on negative numbers", - "schema": { - "exclusiveMinimum": -972783798187987123879878123.18878137 - }, - "tests": [ - { - "description": "comparison works for very negative numbers", - "data": -972783798187987123879878123.188781371, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/ecmascript-regex.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/ecmascript-regex.json deleted file mode 100644 index c4886aaa..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/ecmascript-regex.json +++ /dev/null @@ -1,552 +0,0 @@ -[ - { - "description": "ECMA 262 regex $ does not match trailing newline", - "schema": { - "type": "string", - "pattern": "^abc$" - }, - "tests": [ - { - "description": "matches in Python, but not in ECMA 262", - "data": "abc\\n", - "valid": false - }, - { - "description": "matches", - "data": "abc", - "valid": true - } - ] - }, - { - "description": "ECMA 262 regex converts \\t to horizontal tab", - "schema": { - "type": "string", - "pattern": "^\\t$" - }, - "tests": [ - { - "description": "does not match", - "data": "\\t", - "valid": false - }, - { - "description": "matches", - "data": "\u0009", - "valid": true - } - ] - }, - { - "description": "ECMA 262 regex escapes control codes with \\c and upper letter", - "schema": { - "type": "string", - "pattern": "^\\cC$" - }, - "tests": [ - { - "description": "does not match", - "data": "\\cC", - "valid": false - }, - { - "description": "matches", - "data": "\u0003", - "valid": true - } - ] - }, - { - "description": "ECMA 262 regex escapes control codes with \\c and lower letter", - "schema": { - "type": "string", - "pattern": "^\\cc$" - }, - "tests": [ - { - "description": "does not match", - "data": "\\cc", - "valid": false - }, - { - "description": "matches", - "data": "\u0003", - "valid": true - } - ] - }, - { - "description": "ECMA 262 \\d matches ascii digits only", - "schema": { - "type": "string", - "pattern": "^\\d$" - }, - "tests": [ - { - "description": "ASCII zero matches", - "data": "0", - "valid": true - }, - { - "description": "NKO DIGIT ZERO does not match (unlike e.g. Python)", - "data": "߀", - "valid": false - }, - { - "description": "NKO DIGIT ZERO (as \\u escape) does not match", - "data": "\u07c0", - "valid": false - } - ] - }, - { - "description": "ECMA 262 \\D matches everything but ascii digits", - "schema": { - "type": "string", - "pattern": "^\\D$" - }, - "tests": [ - { - "description": "ASCII zero does not match", - "data": "0", - "valid": false - }, - { - "description": "NKO DIGIT ZERO matches (unlike e.g. Python)", - "data": "߀", - "valid": true - }, - { - "description": "NKO DIGIT ZERO (as \\u escape) matches", - "data": "\u07c0", - "valid": true - } - ] - }, - { - "description": "ECMA 262 \\w matches ascii letters only", - "schema": { - "type": "string", - "pattern": "^\\w$" - }, - "tests": [ - { - "description": "ASCII 'a' matches", - "data": "a", - "valid": true - }, - { - "description": "latin-1 e-acute does not match (unlike e.g. Python)", - "data": "é", - "valid": false - } - ] - }, - { - "description": "ECMA 262 \\W matches everything but ascii letters", - "schema": { - "type": "string", - "pattern": "^\\W$" - }, - "tests": [ - { - "description": "ASCII 'a' does not match", - "data": "a", - "valid": false - }, - { - "description": "latin-1 e-acute matches (unlike e.g. Python)", - "data": "é", - "valid": true - } - ] - }, - { - "description": "ECMA 262 \\s matches whitespace", - "schema": { - "type": "string", - "pattern": "^\\s$" - }, - "tests": [ - { - "description": "ASCII space matches", - "data": " ", - "valid": true - }, - { - "description": "Character tabulation matches", - "data": "\t", - "valid": true - }, - { - "description": "Line tabulation matches", - "data": "\u000b", - "valid": true - }, - { - "description": "Form feed matches", - "data": "\u000c", - "valid": true - }, - { - "description": "latin-1 non-breaking-space matches", - "data": "\u00a0", - "valid": true - }, - { - "description": "zero-width whitespace matches", - "data": "\ufeff", - "valid": true - }, - { - "description": "line feed matches (line terminator)", - "data": "\u000a", - "valid": true - }, - { - "description": "paragraph separator matches (line terminator)", - "data": "\u2029", - "valid": true - }, - { - "description": "EM SPACE matches (Space_Separator)", - "data": "\u2003", - "valid": true - }, - { - "description": "Non-whitespace control does not match", - "data": "\u0001", - "valid": false - }, - { - "description": "Non-whitespace does not match", - "data": "\u2013", - "valid": false - } - ] - }, - { - "description": "ECMA 262 \\S matches everything but whitespace", - "schema": { - "type": "string", - "pattern": "^\\S$" - }, - "tests": [ - { - "description": "ASCII space does not match", - "data": " ", - "valid": false - }, - { - "description": "Character tabulation does not match", - "data": "\t", - "valid": false - }, - { - "description": "Line tabulation does not match", - "data": "\u000b", - "valid": false - }, - { - "description": "Form feed does not match", - "data": "\u000c", - "valid": false - }, - { - "description": "latin-1 non-breaking-space does not match", - "data": "\u00a0", - "valid": false - }, - { - "description": "zero-width whitespace does not match", - "data": "\ufeff", - "valid": false - }, - { - "description": "line feed does not match (line terminator)", - "data": "\u000a", - "valid": false - }, - { - "description": "paragraph separator does not match (line terminator)", - "data": "\u2029", - "valid": false - }, - { - "description": "EM SPACE does not match (Space_Separator)", - "data": "\u2003", - "valid": false - }, - { - "description": "Non-whitespace control matches", - "data": "\u0001", - "valid": true - }, - { - "description": "Non-whitespace matches", - "data": "\u2013", - "valid": true - } - ] - }, - { - "description": "patterns always use unicode semantics with pattern", - "schema": { "pattern": "\\p{Letter}cole" }, - "tests": [ - { - "description": "ascii character in json string", - "data": "Les hivers de mon enfance etaient des saisons longues, longues. Nous vivions en trois lieux: l'ecole, l'eglise et la patinoire; mais la vraie vie etait sur la patinoire.", - "valid": true - }, - { - "description": "literal unicode character in json string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": true - }, - { - "description": "unicode character in hex format in string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'\u00e9cole, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": true - }, - { - "description": "unicode matching is case-sensitive", - "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", - "valid": false - } - ] - }, - { - "description": "\\w in patterns matches [A-Za-z0-9_], not unicode letters", - "schema": { "pattern": "\\wcole" }, - "tests": [ - { - "description": "ascii character in json string", - "data": "Les hivers de mon enfance etaient des saisons longues, longues. Nous vivions en trois lieux: l'ecole, l'eglise et la patinoire; mais la vraie vie etait sur la patinoire.", - "valid": true - }, - { - "description": "literal unicode character in json string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": false - }, - { - "description": "unicode character in hex format in string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'\u00e9cole, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": false - }, - { - "description": "unicode matching is case-sensitive", - "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", - "valid": false - } - ] - }, - { - "description": "pattern with ASCII ranges", - "schema": { "pattern": "[a-z]cole" }, - "tests": [ - { - "description": "literal unicode character in json string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": false - }, - { - "description": "unicode character in hex format in string", - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'\u00e9cole, l'église et la patinoire; mais la vraie vie était sur la patinoire.", - "valid": false - }, - { - "description": "ascii characters match", - "data": "Les hivers de mon enfance etaient des saisons longues, longues. Nous vivions en trois lieux: l'ecole, l'eglise et la patinoire; mais la vraie vie etait sur la patinoire.", - "valid": true - } - ] - }, - { - "description": "\\d in pattern matches [0-9], not unicode digits", - "schema": { "pattern": "^\\d+$" }, - "tests": [ - { - "description": "ascii digits", - "data": "42", - "valid": true - }, - { - "description": "ascii non-digits", - "data": "-%#", - "valid": false - }, - { - "description": "non-ascii digits (BENGALI DIGIT FOUR, BENGALI DIGIT TWO)", - "data": "৪২", - "valid": false - } - ] - }, - { - "description": "pattern with non-ASCII digits", - "schema": { "pattern": "^\\p{digit}+$" }, - "tests": [ - { - "description": "ascii digits", - "data": "42", - "valid": true - }, - { - "description": "ascii non-digits", - "data": "-%#", - "valid": false - }, - { - "description": "non-ascii digits (BENGALI DIGIT FOUR, BENGALI DIGIT TWO)", - "data": "৪২", - "valid": true - } - ] - }, - { - "description": "patterns always use unicode semantics with patternProperties", - "schema": { - "type": "object", - "patternProperties": { - "\\p{Letter}cole": true - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "ascii character in json string", - "data": { "l'ecole": "pas de vraie vie" }, - "valid": true - }, - { - "description": "literal unicode character in json string", - "data": { "l'école": "pas de vraie vie" }, - "valid": true - }, - { - "description": "unicode character in hex format in string", - "data": { "l'\u00e9cole": "pas de vraie vie" }, - "valid": true - }, - { - "description": "unicode matching is case-sensitive", - "data": { "L'ÉCOLE": "PAS DE VRAIE VIE" }, - "valid": false - } - ] - }, - { - "description": "\\w in patternProperties matches [A-Za-z0-9_], not unicode letters", - "schema": { - "type": "object", - "patternProperties": { - "\\wcole": true - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "ascii character in json string", - "data": { "l'ecole": "pas de vraie vie" }, - "valid": true - }, - { - "description": "literal unicode character in json string", - "data": { "l'école": "pas de vraie vie" }, - "valid": false - }, - { - "description": "unicode character in hex format in string", - "data": { "l'\u00e9cole": "pas de vraie vie" }, - "valid": false - }, - { - "description": "unicode matching is case-sensitive", - "data": { "L'ÉCOLE": "PAS DE VRAIE VIE" }, - "valid": false - } - ] - }, - { - "description": "patternProperties with ASCII ranges", - "schema": { - "type": "object", - "patternProperties": { - "[a-z]cole": true - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "literal unicode character in json string", - "data": { "l'école": "pas de vraie vie" }, - "valid": false - }, - { - "description": "unicode character in hex format in string", - "data": { "l'\u00e9cole": "pas de vraie vie" }, - "valid": false - }, - { - "description": "ascii characters match", - "data": { "l'ecole": "pas de vraie vie" }, - "valid": true - } - ] - }, - { - "description": "\\d in patternProperties matches [0-9], not unicode digits", - "schema": { - "type": "object", - "patternProperties": { - "^\\d+$": true - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "ascii digits", - "data": { "42": "life, the universe, and everything" }, - "valid": true - }, - { - "description": "ascii non-digits", - "data": { "-%#": "spending the year dead for tax reasons" }, - "valid": false - }, - { - "description": "non-ascii digits (BENGALI DIGIT FOUR, BENGALI DIGIT TWO)", - "data": { "৪২": "khajit has wares if you have coin" }, - "valid": false - } - ] - }, - { - "description": "patternProperties with non-ASCII digits", - "schema": { - "type": "object", - "patternProperties": { - "^\\p{digit}+$": true - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "ascii digits", - "data": { "42": "life, the universe, and everything" }, - "valid": true - }, - { - "description": "ascii non-digits", - "data": { "-%#": "spending the year dead for tax reasons" }, - "valid": false - }, - { - "description": "non-ascii digits (BENGALI DIGIT FOUR, BENGALI DIGIT TWO)", - "data": { "৪২": "khajit has wares if you have coin" }, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/float-overflow.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/float-overflow.json deleted file mode 100644 index 52ff9827..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/float-overflow.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "description": "all integers are multiples of 0.5, if overflow is handled", - "schema": {"type": "integer", "multipleOf": 0.5}, - "tests": [ - { - "description": "valid if optional overflow handling is implemented", - "data": 1e308, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/date-time.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/date-time.json deleted file mode 100644 index 09112737..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/date-time.json +++ /dev/null @@ -1,133 +0,0 @@ -[ - { - "description": "validation of date-time strings", - "schema": { "format": "date-time" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid date-time string", - "data": "1963-06-19T08:30:06.283185Z", - "valid": true - }, - { - "description": "a valid date-time string without second fraction", - "data": "1963-06-19T08:30:06Z", - "valid": true - }, - { - "description": "a valid date-time string with plus offset", - "data": "1937-01-01T12:00:27.87+00:20", - "valid": true - }, - { - "description": "a valid date-time string with minus offset", - "data": "1990-12-31T15:59:50.123-08:00", - "valid": true - }, - { - "description": "a valid date-time with a leap second, UTC", - "data": "1998-12-31T23:59:60Z", - "valid": true - }, - { - "description": "a valid date-time with a leap second, with minus offset", - "data": "1998-12-31T15:59:60.123-08:00", - "valid": true - }, - { - "description": "an invalid date-time past leap second, UTC", - "data": "1998-12-31T23:59:61Z", - "valid": false - }, - { - "description": "an invalid date-time with leap second on a wrong minute, UTC", - "data": "1998-12-31T23:58:60Z", - "valid": false - }, - { - "description": "an invalid date-time with leap second on a wrong hour, UTC", - "data": "1998-12-31T22:59:60Z", - "valid": false - }, - { - "description": "an invalid day in date-time string", - "data": "1990-02-31T15:59:59.123-08:00", - "valid": false - }, - { - "description": "an invalid offset in date-time string", - "data": "1990-12-31T15:59:59-24:00", - "valid": false - }, - { - "description": "an invalid closing Z after time-zone offset", - "data": "1963-06-19T08:30:06.28123+01:00Z", - "valid": false - }, - { - "description": "an invalid date-time string", - "data": "06/19/1963 08:30:06 PST", - "valid": false - }, - { - "description": "case-insensitive T and Z", - "data": "1963-06-19t08:30:06.283185z", - "valid": true - }, - { - "description": "only RFC3339 not all of ISO 8601 are valid", - "data": "2013-350T01:01:01", - "valid": false - }, - { - "description": "invalid non-padded month dates", - "data": "1963-6-19T08:30:06.283185Z", - "valid": false - }, - { - "description": "invalid non-padded day dates", - "data": "1963-06-1T08:30:06.283185Z", - "valid": false - }, - { - "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", - "data": "1963-06-1৪T00:00:00Z", - "valid": false - }, - { - "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", - "data": "1963-06-11T0৪:00:00Z", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/email.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/email.json deleted file mode 100644 index d6761a46..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/email.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "description": "validation of e-mail addresses", - "schema": { "format": "email" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid e-mail address", - "data": "joe.bloggs@example.com", - "valid": true - }, - { - "description": "an invalid e-mail address", - "data": "2962", - "valid": false - }, - { - "description": "tilde in local part is valid", - "data": "te~st@example.com", - "valid": true - }, - { - "description": "tilde before local part is valid", - "data": "~test@example.com", - "valid": true - }, - { - "description": "tilde after local part is valid", - "data": "test~@example.com", - "valid": true - }, - { - "description": "dot before local part is not valid", - "data": ".test@example.com", - "valid": false - }, - { - "description": "dot after local part is not valid", - "data": "test.@example.com", - "valid": false - }, - { - "description": "two separated dots inside local part are valid", - "data": "te.s.t@example.com", - "valid": true - }, - { - "description": "two subsequent dots inside local part are not valid", - "data": "te..st@example.com", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/hostname.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/hostname.json deleted file mode 100644 index a8ecd194..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/hostname.json +++ /dev/null @@ -1,118 +0,0 @@ -[ - { - "description": "validation of host names", - "schema": { "format": "hostname" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid host name", - "data": "www.example.com", - "valid": true - }, - { - "description": "a valid punycoded IDN hostname", - "data": "xn--4gbwdl.xn--wgbh1c", - "valid": true - }, - { - "description": "a host name starting with an illegal character", - "data": "-a-host-name-that-starts-with--", - "valid": false - }, - { - "description": "a host name containing illegal characters", - "data": "not_a_valid_host_name", - "valid": false - }, - { - "description": "a host name with a component too long", - "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", - "valid": false - }, - { - "description": "starts with hyphen", - "data": "-hostname", - "valid": false - }, - { - "description": "ends with hyphen", - "data": "hostname-", - "valid": false - }, - { - "description": "starts with underscore", - "data": "_hostname", - "valid": false - }, - { - "description": "ends with underscore", - "data": "hostname_", - "valid": false - }, - { - "description": "contains underscore", - "data": "host_name", - "valid": false - }, - { - "description": "maximum label length", - "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com", - "valid": true - }, - { - "description": "exceeds maximum label length", - "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com", - "valid": false - }, - { - "description": "single label", - "data": "hostname", - "valid": true - }, - { - "description": "single label with hyphen", - "data": "host-name", - "valid": true - }, - { - "description": "single label with digits", - "data": "h0stn4me", - "valid": true - }, - { - "description": "single label ending with digit", - "data": "hostnam3", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/ipv4.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/ipv4.json deleted file mode 100644 index 9680fe62..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/ipv4.json +++ /dev/null @@ -1,89 +0,0 @@ -[ - { - "description": "validation of IP addresses", - "schema": { "format": "ipv4" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid IP address", - "data": "192.168.0.1", - "valid": true - }, - { - "description": "an IP address with too many components", - "data": "127.0.0.0.1", - "valid": false - }, - { - "description": "an IP address with out-of-range values", - "data": "256.256.256.256", - "valid": false - }, - { - "description": "an IP address without 4 components", - "data": "127.0", - "valid": false - }, - { - "description": "an IP address as an integer", - "data": "0x7f000001", - "valid": false - }, - { - "description": "an IP address as an integer (decimal)", - "data": "2130706433", - "valid": false - }, - { - "description": "invalid leading zeroes, as they are treated as octals", - "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/", - "data": "087.10.0.1", - "valid": false - }, - { - "description": "value without leading zero is valid", - "data": "87.10.0.1", - "valid": true - }, - { - "description": "invalid non-ASCII '২' (a Bengali 2)", - "data": "1২7.0.0.1", - "valid": false - }, - { - "description": "netmask is not a part of ipv4 address", - "data": "192.168.1.0/24", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/ipv6.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/ipv6.json deleted file mode 100644 index 94368f2a..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/ipv6.json +++ /dev/null @@ -1,208 +0,0 @@ -[ - { - "description": "validation of IPv6 addresses", - "schema": { "format": "ipv6" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid IPv6 address", - "data": "::1", - "valid": true - }, - { - "description": "an IPv6 address with out-of-range values", - "data": "12345::", - "valid": false - }, - { - "description": "trailing 4 hex symbols is valid", - "data": "::abef", - "valid": true - }, - { - "description": "trailing 5 hex symbols is invalid", - "data": "::abcef", - "valid": false - }, - { - "description": "an IPv6 address with too many components", - "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", - "valid": false - }, - { - "description": "an IPv6 address containing illegal characters", - "data": "::laptop", - "valid": false - }, - { - "description": "no digits is valid", - "data": "::", - "valid": true - }, - { - "description": "leading colons is valid", - "data": "::42:ff:1", - "valid": true - }, - { - "description": "trailing colons is valid", - "data": "d6::", - "valid": true - }, - { - "description": "missing leading octet is invalid", - "data": ":2:3:4:5:6:7:8", - "valid": false - }, - { - "description": "missing trailing octet is invalid", - "data": "1:2:3:4:5:6:7:", - "valid": false - }, - { - "description": "missing leading octet with omitted octets later", - "data": ":2:3:4::8", - "valid": false - }, - { - "description": "single set of double colons in the middle is valid", - "data": "1:d6::42", - "valid": true - }, - { - "description": "two sets of double colons is invalid", - "data": "1::d6::42", - "valid": false - }, - { - "description": "mixed format with the ipv4 section as decimal octets", - "data": "1::d6:192.168.0.1", - "valid": true - }, - { - "description": "mixed format with double colons between the sections", - "data": "1:2::192.168.0.1", - "valid": true - }, - { - "description": "mixed format with ipv4 section with octet out of range", - "data": "1::2:192.168.256.1", - "valid": false - }, - { - "description": "mixed format with ipv4 section with a hex octet", - "data": "1::2:192.168.ff.1", - "valid": false - }, - { - "description": "mixed format with leading double colons (ipv4-mapped ipv6 address)", - "data": "::ffff:192.168.0.1", - "valid": true - }, - { - "description": "triple colons is invalid", - "data": "1:2:3:4:5:::8", - "valid": false - }, - { - "description": "8 octets", - "data": "1:2:3:4:5:6:7:8", - "valid": true - }, - { - "description": "insufficient octets without double colons", - "data": "1:2:3:4:5:6:7", - "valid": false - }, - { - "description": "no colons is invalid", - "data": "1", - "valid": false - }, - { - "description": "ipv4 is not ipv6", - "data": "127.0.0.1", - "valid": false - }, - { - "description": "ipv4 segment must have 4 octets", - "data": "1:2:3:4:1.2.3", - "valid": false - }, - { - "description": "leading whitespace is invalid", - "data": " ::1", - "valid": false - }, - { - "description": "trailing whitespace is invalid", - "data": "::1 ", - "valid": false - }, - { - "description": "netmask is not a part of ipv6 address", - "data": "fe80::/64", - "valid": false - }, - { - "description": "zone id is not a part of ipv6 address", - "data": "fe80::a%eth1", - "valid": false - }, - { - "description": "a long valid ipv6", - "data": "1000:1000:1000:1000:1000:1000:255.255.255.255", - "valid": true - }, - { - "description": "a long invalid ipv6, below length limit, first", - "data": "100:100:100:100:100:100:255.255.255.255.255", - "valid": false - }, - { - "description": "a long invalid ipv6, below length limit, second", - "data": "100:100:100:100:100:100:100:255.255.255.255", - "valid": false - }, - { - "description": "invalid non-ASCII '৪' (a Bengali 4)", - "data": "1:2:3:4:5:6:7:৪", - "valid": false - }, - { - "description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion", - "data": "1:2::192.16৪.0.1", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/json-pointer.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/json-pointer.json deleted file mode 100644 index a0346b57..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/json-pointer.json +++ /dev/null @@ -1,198 +0,0 @@ -[ - { - "description": "validation of JSON-pointers (JSON String Representation)", - "schema": { "format": "json-pointer" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid JSON-pointer", - "data": "/foo/bar~0/baz~1/%a", - "valid": true - }, - { - "description": "not a valid JSON-pointer (~ not escaped)", - "data": "/foo/bar~", - "valid": false - }, - { - "description": "valid JSON-pointer with empty segment", - "data": "/foo//bar", - "valid": true - }, - { - "description": "valid JSON-pointer with the last empty segment", - "data": "/foo/bar/", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #1", - "data": "", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #2", - "data": "/foo", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #3", - "data": "/foo/0", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #4", - "data": "/", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #5", - "data": "/a~1b", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #6", - "data": "/c%d", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #7", - "data": "/e^f", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #8", - "data": "/g|h", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #9", - "data": "/i\\j", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #10", - "data": "/k\"l", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #11", - "data": "/ ", - "valid": true - }, - { - "description": "valid JSON-pointer as stated in RFC 6901 #12", - "data": "/m~0n", - "valid": true - }, - { - "description": "valid JSON-pointer used adding to the last array position", - "data": "/foo/-", - "valid": true - }, - { - "description": "valid JSON-pointer (- used as object member name)", - "data": "/foo/-/bar", - "valid": true - }, - { - "description": "valid JSON-pointer (multiple escaped characters)", - "data": "/~1~0~0~1~1", - "valid": true - }, - { - "description": "valid JSON-pointer (escaped with fraction part) #1", - "data": "/~1.1", - "valid": true - }, - { - "description": "valid JSON-pointer (escaped with fraction part) #2", - "data": "/~0.1", - "valid": true - }, - { - "description": "not a valid JSON-pointer (URI Fragment Identifier) #1", - "data": "#", - "valid": false - }, - { - "description": "not a valid JSON-pointer (URI Fragment Identifier) #2", - "data": "#/", - "valid": false - }, - { - "description": "not a valid JSON-pointer (URI Fragment Identifier) #3", - "data": "#a", - "valid": false - }, - { - "description": "not a valid JSON-pointer (some escaped, but not all) #1", - "data": "/~0~", - "valid": false - }, - { - "description": "not a valid JSON-pointer (some escaped, but not all) #2", - "data": "/~0/~", - "valid": false - }, - { - "description": "not a valid JSON-pointer (wrong escape character) #1", - "data": "/~2", - "valid": false - }, - { - "description": "not a valid JSON-pointer (wrong escape character) #2", - "data": "/~-1", - "valid": false - }, - { - "description": "not a valid JSON-pointer (multiple characters not escaped)", - "data": "/~~", - "valid": false - }, - { - "description": "not a valid JSON-pointer (isn't empty nor starts with /) #1", - "data": "a", - "valid": false - }, - { - "description": "not a valid JSON-pointer (isn't empty nor starts with /) #2", - "data": "0", - "valid": false - }, - { - "description": "not a valid JSON-pointer (isn't empty nor starts with /) #3", - "data": "a/a", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/unknown.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/unknown.json deleted file mode 100644 index 12339ae5..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/unknown.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "description": "unknown format", - "schema": { "format": "unknown" }, - "tests": [ - { - "description": "unknown formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "unknown formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "unknown formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "unknown formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "unknown formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "unknown formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "unknown formats ignore strings", - "data": "string", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri-reference.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri-reference.json deleted file mode 100644 index 7cdf228d..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri-reference.json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "description": "validation of URI References", - "schema": { "format": "uri-reference" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid URI", - "data": "http://foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "a valid protocol-relative URI Reference", - "data": "//foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "a valid relative URI Reference", - "data": "/abc", - "valid": true - }, - { - "description": "an invalid URI Reference", - "data": "\\\\WINDOWS\\fileshare", - "valid": false - }, - { - "description": "a valid URI Reference", - "data": "abc", - "valid": true - }, - { - "description": "a valid URI fragment", - "data": "#fragment", - "valid": true - }, - { - "description": "an invalid URI fragment", - "data": "#frag\\ment", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri-template.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri-template.json deleted file mode 100644 index df355c55..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri-template.json +++ /dev/null @@ -1,58 +0,0 @@ -[ - { - "description": "format: uri-template", - "schema": { "format": "uri-template" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid uri-template", - "data": "http://example.com/dictionary/{term:1}/{term}", - "valid": true - }, - { - "description": "an invalid uri-template", - "data": "http://example.com/dictionary/{term:1}/{term", - "valid": false - }, - { - "description": "a valid uri-template without variables", - "data": "http://example.com/dictionary", - "valid": true - }, - { - "description": "a valid relative uri-template", - "data": "dictionary/{term:1}/{term}", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri.json deleted file mode 100644 index 4b48d406..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/format/uri.json +++ /dev/null @@ -1,138 +0,0 @@ -[ - { - "description": "validation of URIs", - "schema": { "format": "uri" }, - "tests": [ - { - "description": "all string formats ignore integers", - "data": 12, - "valid": true - }, - { - "description": "all string formats ignore floats", - "data": 13.7, - "valid": true - }, - { - "description": "all string formats ignore objects", - "data": {}, - "valid": true - }, - { - "description": "all string formats ignore arrays", - "data": [], - "valid": true - }, - { - "description": "all string formats ignore booleans", - "data": false, - "valid": true - }, - { - "description": "all string formats ignore nulls", - "data": null, - "valid": true - }, - { - "description": "a valid URL with anchor tag", - "data": "http://foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "a valid URL with anchor tag and parentheses", - "data": "http://foo.com/blah_(wikipedia)_blah#cite-1", - "valid": true - }, - { - "description": "a valid URL with URL-encoded stuff", - "data": "http://foo.bar/?q=Test%20URL-encoded%20stuff", - "valid": true - }, - { - "description": "a valid puny-coded URL ", - "data": "http://xn--nw2a.xn--j6w193g/", - "valid": true - }, - { - "description": "a valid URL with many special characters", - "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", - "valid": true - }, - { - "description": "a valid URL based on IPv4", - "data": "http://223.255.255.254", - "valid": true - }, - { - "description": "a valid URL with ftp scheme", - "data": "ftp://ftp.is.co.za/rfc/rfc1808.txt", - "valid": true - }, - { - "description": "a valid URL for a simple text file", - "data": "http://www.ietf.org/rfc/rfc2396.txt", - "valid": true - }, - { - "description": "a valid URL ", - "data": "ldap://[2001:db8::7]/c=GB?objectClass?one", - "valid": true - }, - { - "description": "a valid mailto URI", - "data": "mailto:John.Doe@example.com", - "valid": true - }, - { - "description": "a valid newsgroup URI", - "data": "news:comp.infosystems.www.servers.unix", - "valid": true - }, - { - "description": "a valid tel URI", - "data": "tel:+1-816-555-1212", - "valid": true - }, - { - "description": "a valid URN", - "data": "urn:oasis:names:specification:docbook:dtd:xml:4.1.2", - "valid": true - }, - { - "description": "an invalid protocol-relative URI Reference", - "data": "//foo.bar/?baz=qux#quux", - "valid": false - }, - { - "description": "an invalid relative URI Reference", - "data": "/abc", - "valid": false - }, - { - "description": "an invalid URI", - "data": "\\\\WINDOWS\\fileshare", - "valid": false - }, - { - "description": "an invalid URI though valid URI reference", - "data": "abc", - "valid": false - }, - { - "description": "an invalid URI with spaces", - "data": "http:// shouldfail.com", - "valid": false - }, - { - "description": "an invalid URI with spaces and missing scheme", - "data": ":// should fail", - "valid": false - }, - { - "description": "an invalid URI with comma in scheme", - "data": "bar,baz:foo", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/id.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/id.json deleted file mode 100644 index 03d30fcb..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/id.json +++ /dev/null @@ -1,134 +0,0 @@ -[ - { - "description": "id inside an enum is not a real identifier", - "comment": "the implementation must not be confused by an id buried in the enum", - "schema": { - "definitions": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { "$ref": "#/definitions/id_in_enum" }, - { "$ref": "https://localhost:1234/id/my_identifier.json" } - ] - }, - "tests": [ - { - "description": "exact match to enum, and type matches", - "data": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - }, - "valid": true - }, - { - "description": "match $ref to id", - "data": "a string to match #/definitions/id_in_enum", - "valid": true - }, - { - "description": "no match on enum or $ref to id", - "data": 1, - "valid": false - } - ] - }, - { - "description": "non-schema object containing a plain-name $id property", - "schema": { - "definitions": { - "const_not_anchor": { - "const": { - "$id": "#not_a_real_anchor" - } - } - }, - "oneOf": [ - { - "const": "skip not_a_real_anchor" - }, - { - "allOf": [ - { - "not": { - "const": "skip not_a_real_anchor" - } - }, - { - "$ref": "#/definitions/const_not_anchor" - } - ] - } - ] - }, - "tests": [ - { - "description": "skip traversing definition for a valid result", - "data": "skip not_a_real_anchor", - "valid": true - }, - { - "description": "const at const_not_anchor does not match", - "data": 1, - "valid": false - } - ] - }, - { - "description": "non-schema object containing an $id property", - "schema": { - "definitions": { - "const_not_id": { - "const": { - "$id": "not_a_real_id" - } - } - }, - "oneOf": [ - { - "const":"skip not_a_real_id" - }, - { - "allOf": [ - { - "not": { - "const": "skip not_a_real_id" - } - }, - { - "$ref": "#/definitions/const_not_id" - } - ] - } - ] - }, - "tests": [ - { - "description": "skip traversing definition for a valid result", - "data": "skip not_a_real_id", - "valid": true - }, - { - "description": "const at const_not_id does not match", - "data": 1, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/non-bmp-regex.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/non-bmp-regex.json deleted file mode 100644 index dd67af2b..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/non-bmp-regex.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "description": "Proper UTF-16 surrogate pair handling: pattern", - "comment": "Optional because .Net doesn't correctly handle 32-bit Unicode characters", - "schema": { "pattern": "^🐲*$" }, - "tests": [ - { - "description": "matches empty", - "data": "", - "valid": true - }, - { - "description": "matches single", - "data": "🐲", - "valid": true - }, - { - "description": "matches two", - "data": "🐲🐲", - "valid": true - }, - { - "description": "doesn't match one", - "data": "🐉", - "valid": false - }, - { - "description": "doesn't match two", - "data": "🐉🐉", - "valid": false - }, - { - "description": "doesn't match one ASCII", - "data": "D", - "valid": false - }, - { - "description": "doesn't match two ASCII", - "data": "DD", - "valid": false - } - ] - }, - { - "description": "Proper UTF-16 surrogate pair handling: patternProperties", - "comment": "Optional because .Net doesn't correctly handle 32-bit Unicode characters", - "schema": { - "patternProperties": { - "^🐲*$": { - "type": "integer" - } - } - }, - "tests": [ - { - "description": "matches empty", - "data": { "": 1 }, - "valid": true - }, - { - "description": "matches single", - "data": { "🐲": 1 }, - "valid": true - }, - { - "description": "matches two", - "data": { "🐲🐲": 1 }, - "valid": true - }, - { - "description": "doesn't match one", - "data": { "🐲": "hello" }, - "valid": false - }, - { - "description": "doesn't match two", - "data": { "🐲🐲": "hello" }, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/unknownKeyword.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/unknownKeyword.json deleted file mode 100644 index 1f58d97e..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/optional/unknownKeyword.json +++ /dev/null @@ -1,56 +0,0 @@ -[ - { - "description": "$id inside an unknown keyword is not a real identifier", - "comment": "the implementation must not be confused by an $id in locations we do not know how to parse", - "schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { "$ref": "#/definitions/id_in_unknown0" }, - { "$ref": "#/definitions/id_in_unknown1" }, - { "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" } - ] - }, - "tests": [ - { - "description": "type matches second anyOf, which has a real schema in it", - "data": "a string", - "valid": true - }, - { - "description": "type matches non-schema in first anyOf", - "data": null, - "valid": false - }, - { - "description": "type matches non-schema in third anyOf", - "data": 1, - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/pattern.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/pattern.json deleted file mode 100644 index 92db0f97..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/pattern.json +++ /dev/null @@ -1,59 +0,0 @@ -[ - { - "description": "pattern validation", - "schema": {"pattern": "^a*$"}, - "tests": [ - { - "description": "a matching pattern is valid", - "data": "aaa", - "valid": true - }, - { - "description": "a non-matching pattern is invalid", - "data": "abc", - "valid": false - }, - { - "description": "ignores booleans", - "data": true, - "valid": true - }, - { - "description": "ignores integers", - "data": 123, - "valid": true - }, - { - "description": "ignores floats", - "data": 1.0, - "valid": true - }, - { - "description": "ignores objects", - "data": {}, - "valid": true - }, - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores null", - "data": null, - "valid": true - } - ] - }, - { - "description": "pattern is not anchored", - "schema": {"pattern": "a+"}, - "tests": [ - { - "description": "matches a substring", - "data": "xxaayy", - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/patternProperties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/patternProperties.json deleted file mode 100644 index c276e647..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/patternProperties.json +++ /dev/null @@ -1,171 +0,0 @@ -[ - { - "description": - "patternProperties validates properties matching a regex", - "schema": { - "patternProperties": { - "f.*o": {"type": "integer"} - } - }, - "tests": [ - { - "description": "a single valid match is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "multiple valid matches is valid", - "data": {"foo": 1, "foooooo" : 2}, - "valid": true - }, - { - "description": "a single invalid match is invalid", - "data": {"foo": "bar", "fooooo": 2}, - "valid": false - }, - { - "description": "multiple invalid matches is invalid", - "data": {"foo": "bar", "foooooo" : "baz"}, - "valid": false - }, - { - "description": "ignores arrays", - "data": ["foo"], - "valid": true - }, - { - "description": "ignores strings", - "data": "foo", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "multiple simultaneous patternProperties are validated", - "schema": { - "patternProperties": { - "a*": {"type": "integer"}, - "aaa*": {"maximum": 20} - } - }, - "tests": [ - { - "description": "a single valid match is valid", - "data": {"a": 21}, - "valid": true - }, - { - "description": "a simultaneous match is valid", - "data": {"aaaa": 18}, - "valid": true - }, - { - "description": "multiple matches is valid", - "data": {"a": 21, "aaaa": 18}, - "valid": true - }, - { - "description": "an invalid due to one is invalid", - "data": {"a": "bar"}, - "valid": false - }, - { - "description": "an invalid due to the other is invalid", - "data": {"aaaa": 31}, - "valid": false - }, - { - "description": "an invalid due to both is invalid", - "data": {"aaa": "foo", "aaaa": 31}, - "valid": false - } - ] - }, - { - "description": "regexes are not anchored by default and are case sensitive", - "schema": { - "patternProperties": { - "[0-9]{2,}": { "type": "boolean" }, - "X_": { "type": "string" } - } - }, - "tests": [ - { - "description": "non recognized members are ignored", - "data": { "answer 1": "42" }, - "valid": true - }, - { - "description": "recognized members are accounted for", - "data": { "a31b": null }, - "valid": false - }, - { - "description": "regexes are case sensitive", - "data": { "a_x_3": 3 }, - "valid": true - }, - { - "description": "regexes are case sensitive, 2", - "data": { "a_X_3": 3 }, - "valid": false - } - ] - }, - { - "description": "patternProperties with boolean schemas", - "schema": { - "patternProperties": { - "f.*": true, - "b.*": false - } - }, - "tests": [ - { - "description": "object with property matching schema true is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "object with property matching schema false is invalid", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "object with both properties is invalid", - "data": {"foo": 1, "bar": 2}, - "valid": false - }, - { - "description": "object with a property matching both true and false is invalid", - "data": {"foobar":1}, - "valid": false - }, - { - "description": "empty object is valid", - "data": {}, - "valid": true - } - ] - }, - { - "description": "patternProperties with null valued instance properties", - "schema": { - "patternProperties": { - "^.*bar$": {"type": "null"} - } - }, - "tests": [ - { - "description": "allows null values", - "data": {"foobar": null}, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/properties.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/properties.json deleted file mode 100644 index 5b971ca0..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/properties.json +++ /dev/null @@ -1,236 +0,0 @@ -[ - { - "description": "object properties validation", - "schema": { - "properties": { - "foo": {"type": "integer"}, - "bar": {"type": "string"} - } - }, - "tests": [ - { - "description": "both properties present and valid is valid", - "data": {"foo": 1, "bar": "baz"}, - "valid": true - }, - { - "description": "one property invalid is invalid", - "data": {"foo": 1, "bar": {}}, - "valid": false - }, - { - "description": "both properties invalid is invalid", - "data": {"foo": [], "bar": {}}, - "valid": false - }, - { - "description": "doesn't invalidate other properties", - "data": {"quux": []}, - "valid": true - }, - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": - "properties, patternProperties, additionalProperties interaction", - "schema": { - "properties": { - "foo": {"type": "array", "maxItems": 3}, - "bar": {"type": "array"} - }, - "patternProperties": {"f.o": {"minItems": 2}}, - "additionalProperties": {"type": "integer"} - }, - "tests": [ - { - "description": "property validates property", - "data": {"foo": [1, 2]}, - "valid": true - }, - { - "description": "property invalidates property", - "data": {"foo": [1, 2, 3, 4]}, - "valid": false - }, - { - "description": "patternProperty invalidates property", - "data": {"foo": []}, - "valid": false - }, - { - "description": "patternProperty validates nonproperty", - "data": {"fxo": [1, 2]}, - "valid": true - }, - { - "description": "patternProperty invalidates nonproperty", - "data": {"fxo": []}, - "valid": false - }, - { - "description": "additionalProperty ignores property", - "data": {"bar": []}, - "valid": true - }, - { - "description": "additionalProperty validates others", - "data": {"quux": 3}, - "valid": true - }, - { - "description": "additionalProperty invalidates others", - "data": {"quux": "foo"}, - "valid": false - } - ] - }, - { - "description": "properties with boolean schema", - "schema": { - "properties": { - "foo": true, - "bar": false - } - }, - "tests": [ - { - "description": "no property present is valid", - "data": {}, - "valid": true - }, - { - "description": "only 'true' property present is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "only 'false' property present is invalid", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "both properties present is invalid", - "data": {"foo": 1, "bar": 2}, - "valid": false - } - ] - }, - { - "description": "properties with escaped characters", - "schema": { - "properties": { - "foo\nbar": {"type": "number"}, - "foo\"bar": {"type": "number"}, - "foo\\bar": {"type": "number"}, - "foo\rbar": {"type": "number"}, - "foo\tbar": {"type": "number"}, - "foo\fbar": {"type": "number"} - } - }, - "tests": [ - { - "description": "object with all numbers is valid", - "data": { - "foo\nbar": 1, - "foo\"bar": 1, - "foo\\bar": 1, - "foo\rbar": 1, - "foo\tbar": 1, - "foo\fbar": 1 - }, - "valid": true - }, - { - "description": "object with strings is invalid", - "data": { - "foo\nbar": "1", - "foo\"bar": "1", - "foo\\bar": "1", - "foo\rbar": "1", - "foo\tbar": "1", - "foo\fbar": "1" - }, - "valid": false - } - ] - }, - { - "description": "properties with null valued instance properties", - "schema": { - "properties": { - "foo": {"type": "null"} - } - }, - "tests": [ - { - "description": "allows null values", - "data": {"foo": null}, - "valid": true - } - ] - }, - { - "description": "properties whose names are Javascript object property names", - "comment": "Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object.", - "schema": { - "properties": { - "__proto__": {"type": "number"}, - "toString": { - "properties": { "length": { "type": "string" } } - }, - "constructor": {"type": "number"} - } - }, - "tests": [ - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - }, - { - "description": "none of the properties mentioned", - "data": {}, - "valid": true - }, - { - "description": "__proto__ not valid", - "data": { "__proto__": "foo" }, - "valid": false - }, - { - "description": "toString not valid", - "data": { "toString": { "length": 37 } }, - "valid": false - }, - { - "description": "constructor not valid", - "data": { "constructor": { "length": 37 } }, - "valid": false - }, - { - "description": "all present and valid", - "data": { - "__proto__": 12, - "toString": { "length": "foo" }, - "constructor": 37 - }, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/propertyNames.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/propertyNames.json deleted file mode 100644 index f0788e64..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/propertyNames.json +++ /dev/null @@ -1,107 +0,0 @@ -[ - { - "description": "propertyNames validation", - "schema": { - "propertyNames": {"maxLength": 3} - }, - "tests": [ - { - "description": "all property names valid", - "data": { - "f": {}, - "foo": {} - }, - "valid": true - }, - { - "description": "some property names invalid", - "data": { - "foo": {}, - "foobar": {} - }, - "valid": false - }, - { - "description": "object without properties is valid", - "data": {}, - "valid": true - }, - { - "description": "ignores arrays", - "data": [1, 2, 3, 4], - "valid": true - }, - { - "description": "ignores strings", - "data": "foobar", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "propertyNames validation with pattern", - "schema": { - "propertyNames": { "pattern": "^a+$" } - }, - "tests": [ - { - "description": "matching property names valid", - "data": { - "a": {}, - "aa": {}, - "aaa": {} - }, - "valid": true - }, - { - "description": "non-matching property name is invalid", - "data": { - "aaA": {} - }, - "valid": false - }, - { - "description": "object without properties is valid", - "data": {}, - "valid": true - } - ] - }, - { - "description": "propertyNames with boolean schema true", - "schema": {"propertyNames": true}, - "tests": [ - { - "description": "object with any properties is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "empty object is valid", - "data": {}, - "valid": true - } - ] - }, - { - "description": "propertyNames with boolean schema false", - "schema": {"propertyNames": false}, - "tests": [ - { - "description": "object with any properties is invalid", - "data": {"foo": 1}, - "valid": false - }, - { - "description": "empty object is valid", - "data": {}, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/ref.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/ref.json deleted file mode 100644 index 379322c7..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/ref.json +++ /dev/null @@ -1,929 +0,0 @@ -[ - { - "description": "root pointer ref", - "schema": { - "properties": { - "foo": {"$ref": "#"} - }, - "additionalProperties": false - }, - "tests": [ - { - "description": "match", - "data": {"foo": false}, - "valid": true - }, - { - "description": "recursive match", - "data": {"foo": {"foo": false}}, - "valid": true - }, - { - "description": "mismatch", - "data": {"bar": false}, - "valid": false - }, - { - "description": "recursive mismatch", - "data": {"foo": {"bar": false}}, - "valid": false - } - ] - }, - { - "description": "relative pointer ref to object", - "schema": { - "properties": { - "foo": {"type": "integer"}, - "bar": {"$ref": "#/properties/foo"} - } - }, - "tests": [ - { - "description": "match", - "data": {"bar": 3}, - "valid": true - }, - { - "description": "mismatch", - "data": {"bar": true}, - "valid": false - } - ] - }, - { - "description": "relative pointer ref to array", - "schema": { - "items": [ - {"type": "integer"}, - {"$ref": "#/items/0"} - ] - }, - "tests": [ - { - "description": "match array", - "data": [1, 2], - "valid": true - }, - { - "description": "mismatch array", - "data": [1, "foo"], - "valid": false - } - ] - }, - { - "description": "escaped pointer ref", - "schema": { - "definitions": { - "tilde~field": {"type": "integer"}, - "slash/field": {"type": "integer"}, - "percent%field": {"type": "integer"} - }, - "properties": { - "tilde": {"$ref": "#/definitions/tilde~0field"}, - "slash": {"$ref": "#/definitions/slash~1field"}, - "percent": {"$ref": "#/definitions/percent%25field"} - } - }, - "tests": [ - { - "description": "slash invalid", - "data": {"slash": "aoeu"}, - "valid": false - }, - { - "description": "tilde invalid", - "data": {"tilde": "aoeu"}, - "valid": false - }, - { - "description": "percent invalid", - "data": {"percent": "aoeu"}, - "valid": false - }, - { - "description": "slash valid", - "data": {"slash": 123}, - "valid": true - }, - { - "description": "tilde valid", - "data": {"tilde": 123}, - "valid": true - }, - { - "description": "percent valid", - "data": {"percent": 123}, - "valid": true - } - ] - }, - { - "description": "nested refs", - "schema": { - "definitions": { - "a": {"type": "integer"}, - "b": {"$ref": "#/definitions/a"}, - "c": {"$ref": "#/definitions/b"} - }, - "allOf": [{ "$ref": "#/definitions/c" }] - }, - "tests": [ - { - "description": "nested ref valid", - "data": 5, - "valid": true - }, - { - "description": "nested ref invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "ref overrides any sibling keywords", - "schema": { - "definitions": { - "reffed": { - "type": "array" - } - }, - "properties": { - "foo": { - "$ref": "#/definitions/reffed", - "maxItems": 2 - } - } - }, - "tests": [ - { - "description": "ref valid", - "data": { "foo": [] }, - "valid": true - }, - { - "description": "ref valid, maxItems ignored", - "data": { "foo": [ 1, 2, 3] }, - "valid": true - }, - { - "description": "ref invalid", - "data": { "foo": "string" }, - "valid": false - } - ] - }, - { - "description": "$ref prevents a sibling $id from changing the base uri", - "schema": { - "$id": "http://localhost:1234/sibling_id/base/", - "definitions": { - "foo": { - "$id": "http://localhost:1234/sibling_id/foo.json", - "type": "string" - }, - "base_foo": { - "$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json", - "$id": "foo.json", - "type": "number" - } - }, - "allOf": [ - { - "$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not http://localhost:1234/sibling_id/foo.json", - "$id": "http://localhost:1234/sibling_id/", - "$ref": "foo.json" - } - ] - }, - "tests": [ - { - "description": "$ref resolves to /definitions/base_foo, data does not validate", - "data": "a", - "valid": false - }, - { - "description": "$ref resolves to /definitions/base_foo, data validates", - "data": 1, - "valid": true - } - ] - }, - { - "description": "remote ref, containing refs itself", - "schema": {"$ref": "http://json-schema.org/draft-06/schema#"}, - "tests": [ - { - "description": "remote ref valid", - "data": {"minLength": 1}, - "valid": true - }, - { - "description": "remote ref invalid", - "data": {"minLength": -1}, - "valid": false - } - ] - }, - { - "description": "property named $ref that is not a reference", - "schema": { - "properties": { - "$ref": {"type": "string"} - } - }, - "tests": [ - { - "description": "property named $ref valid", - "data": {"$ref": "a"}, - "valid": true - }, - { - "description": "property named $ref invalid", - "data": {"$ref": 2}, - "valid": false - } - ] - }, - { - "description": "property named $ref, containing an actual $ref", - "schema": { - "properties": { - "$ref": {"$ref": "#/definitions/is-string"} - }, - "definitions": { - "is-string": { - "type": "string" - } - } - }, - "tests": [ - { - "description": "property named $ref valid", - "data": {"$ref": "a"}, - "valid": true - }, - { - "description": "property named $ref invalid", - "data": {"$ref": 2}, - "valid": false - } - ] - }, - { - "description": "$ref to boolean schema true", - "schema": { - "allOf": [{ "$ref": "#/definitions/bool" }], - "definitions": { - "bool": true - } - }, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "$ref to boolean schema false", - "schema": { - "allOf": [{ "$ref": "#/definitions/bool" }], - "definitions": { - "bool": false - } - }, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "Recursive references between schemas", - "schema": { - "$id": "http://localhost:1234/tree", - "description": "tree of nodes", - "type": "object", - "properties": { - "meta": {"type": "string"}, - "nodes": { - "type": "array", - "items": {"$ref": "node"} - } - }, - "required": ["meta", "nodes"], - "definitions": { - "node": { - "$id": "http://localhost:1234/node", - "description": "node", - "type": "object", - "properties": { - "value": {"type": "number"}, - "subtree": {"$ref": "tree"} - }, - "required": ["value"] - } - } - }, - "tests": [ - { - "description": "valid tree", - "data": { - "meta": "root", - "nodes": [ - { - "value": 1, - "subtree": { - "meta": "child", - "nodes": [ - {"value": 1.1}, - {"value": 1.2} - ] - } - }, - { - "value": 2, - "subtree": { - "meta": "child", - "nodes": [ - {"value": 2.1}, - {"value": 2.2} - ] - } - } - ] - }, - "valid": true - }, - { - "description": "invalid tree", - "data": { - "meta": "root", - "nodes": [ - { - "value": 1, - "subtree": { - "meta": "child", - "nodes": [ - {"value": "string is invalid"}, - {"value": 1.2} - ] - } - }, - { - "value": 2, - "subtree": { - "meta": "child", - "nodes": [ - {"value": 2.1}, - {"value": 2.2} - ] - } - } - ] - }, - "valid": false - } - ] - }, - { - "description": "refs with quote", - "schema": { - "properties": { - "foo\"bar": {"$ref": "#/definitions/foo%22bar"} - }, - "definitions": { - "foo\"bar": {"type": "number"} - } - }, - "tests": [ - { - "description": "object with numbers is valid", - "data": { - "foo\"bar": 1 - }, - "valid": true - }, - { - "description": "object with strings is invalid", - "data": { - "foo\"bar": "1" - }, - "valid": false - } - ] - }, - { - "description": "Location-independent identifier", - "schema": { - "allOf": [{ - "$ref": "#foo" - }], - "definitions": { - "A": { - "$id": "#foo", - "type": "integer" - } - } - }, - "tests": [ - { - "data": 1, - "description": "match", - "valid": true - }, - { - "data": "a", - "description": "mismatch", - "valid": false - } - ] - }, - { - "description": "Reference an anchor with a non-relative URI", - "schema": { - "$id": "https://example.com/schema-with-anchor", - "allOf": [{ - "$ref": "https://example.com/schema-with-anchor#foo" - }], - "definitions": { - "A": { - "$id": "#foo", - "type": "integer" - } - } - }, - "tests": [ - { - "data": 1, - "description": "match", - "valid": true - }, - { - "data": "a", - "description": "mismatch", - "valid": false - } - ] - }, - { - "description": "Location-independent identifier with base URI change in subschema", - "schema": { - "$id": "http://localhost:1234/root", - "allOf": [{ - "$ref": "http://localhost:1234/nested.json#foo" - }], - "definitions": { - "A": { - "$id": "nested.json", - "definitions": { - "B": { - "$id": "#foo", - "type": "integer" - } - } - } - } - }, - "tests": [ - { - "data": 1, - "description": "match", - "valid": true - }, - { - "data": "a", - "description": "mismatch", - "valid": false - } - ] - }, - { - "description": "naive replacement of $ref with its destination is not correct", - "schema": { - "definitions": { - "a_string": { "type": "string" } - }, - "enum": [ - { "$ref": "#/definitions/a_string" } - ] - }, - "tests": [ - { - "description": "do not evaluate the $ref inside the enum, matching any string", - "data": "this is a string", - "valid": false - }, - { - "description": "do not evaluate the $ref inside the enum, definition exact match", - "data": { "type": "string" }, - "valid": false - }, - { - "description": "match the enum exactly", - "data": { "$ref": "#/definitions/a_string" }, - "valid": true - } - ] - }, - { - "description": "refs with relative uris and defs", - "schema": { - "$id": "http://example.com/schema-relative-uri-defs1.json", - "properties": { - "foo": { - "$id": "schema-relative-uri-defs2.json", - "definitions": { - "inner": { - "properties": { - "bar": { "type": "string" } - } - } - }, - "allOf": [ { "$ref": "#/definitions/inner" } ] - } - }, - "allOf": [ { "$ref": "schema-relative-uri-defs2.json" } ] - }, - "tests": [ - { - "description": "invalid on inner field", - "data": { - "foo": { - "bar": 1 - }, - "bar": "a" - }, - "valid": false - }, - { - "description": "invalid on outer field", - "data": { - "foo": { - "bar": "a" - }, - "bar": 1 - }, - "valid": false - }, - { - "description": "valid on both fields", - "data": { - "foo": { - "bar": "a" - }, - "bar": "a" - }, - "valid": true - } - ] - }, - { - "description": "relative refs with absolute uris and defs", - "schema": { - "$id": "http://example.com/schema-refs-absolute-uris-defs1.json", - "properties": { - "foo": { - "$id": "http://example.com/schema-refs-absolute-uris-defs2.json", - "definitions": { - "inner": { - "properties": { - "bar": { "type": "string" } - } - } - }, - "allOf": [ { "$ref": "#/definitions/inner" } ] - } - }, - "allOf": [ { "$ref": "schema-refs-absolute-uris-defs2.json" } ] - }, - "tests": [ - { - "description": "invalid on inner field", - "data": { - "foo": { - "bar": 1 - }, - "bar": "a" - }, - "valid": false - }, - { - "description": "invalid on outer field", - "data": { - "foo": { - "bar": "a" - }, - "bar": 1 - }, - "valid": false - }, - { - "description": "valid on both fields", - "data": { - "foo": { - "bar": "a" - }, - "bar": "a" - }, - "valid": true - } - ] - }, - { - "description": "simple URN base URI with $ref via the URN", - "schema": { - "$comment": "URIs do not have to have HTTP(s) schemes", - "$id": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed", - "minimum": 30, - "properties": { - "foo": {"$ref": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed"} - } - }, - "tests": [ - { - "description": "valid under the URN IDed schema", - "data": {"foo": 37}, - "valid": true - }, - { - "description": "invalid under the URN IDed schema", - "data": {"foo": 12}, - "valid": false - } - ] - }, - { - "description": "simple URN base URI with JSON pointer", - "schema": { - "$comment": "URIs do not have to have HTTP(s) schemes", - "$id": "urn:uuid:deadbeef-1234-00ff-ff00-4321feebdaed", - "properties": { - "foo": {"$ref": "#/definitions/bar"} - }, - "definitions": { - "bar": {"type": "string"} - } - }, - "tests": [ - { - "description": "a string is valid", - "data": {"foo": "bar"}, - "valid": true - }, - { - "description": "a non-string is invalid", - "data": {"foo": 12}, - "valid": false - } - ] - }, - { - "description": "URN base URI with NSS", - "schema": { - "$comment": "RFC 8141 §2.2", - "$id": "urn:example:1/406/47452/2", - "properties": { - "foo": {"$ref": "#/definitions/bar"} - }, - "definitions": { - "bar": {"type": "string"} - } - }, - "tests": [ - { - "description": "a string is valid", - "data": {"foo": "bar"}, - "valid": true - }, - { - "description": "a non-string is invalid", - "data": {"foo": 12}, - "valid": false - } - ] - }, - { - "description": "URN base URI with r-component", - "schema": { - "$comment": "RFC 8141 §2.3.1", - "$id": "urn:example:foo-bar-baz-qux?+CCResolve:cc=uk", - "properties": { - "foo": {"$ref": "#/definitions/bar"} - }, - "definitions": { - "bar": {"type": "string"} - } - }, - "tests": [ - { - "description": "a string is valid", - "data": {"foo": "bar"}, - "valid": true - }, - { - "description": "a non-string is invalid", - "data": {"foo": 12}, - "valid": false - } - ] - }, - { - "description": "URN base URI with q-component", - "schema": { - "$comment": "RFC 8141 §2.3.2", - "$id": "urn:example:weather?=op=map&lat=39.56&lon=-104.85&datetime=1969-07-21T02:56:15Z", - "properties": { - "foo": {"$ref": "#/definitions/bar"} - }, - "definitions": { - "bar": {"type": "string"} - } - }, - "tests": [ - { - "description": "a string is valid", - "data": {"foo": "bar"}, - "valid": true - }, - { - "description": "a non-string is invalid", - "data": {"foo": 12}, - "valid": false - } - ] - }, - { - "description": "URN base URI with URN and JSON pointer ref", - "schema": { - "$id": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed", - "properties": { - "foo": {"$ref": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed#/definitions/bar"} - }, - "definitions": { - "bar": {"type": "string"} - } - }, - "tests": [ - { - "description": "a string is valid", - "data": {"foo": "bar"}, - "valid": true - }, - { - "description": "a non-string is invalid", - "data": {"foo": 12}, - "valid": false - } - ] - }, - { - "description": "URN base URI with URN and anchor ref", - "schema": { - "$id": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed", - "properties": { - "foo": {"$ref": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed#something"} - }, - "definitions": { - "bar": { - "$id": "#something", - "type": "string" - } - } - }, - "tests": [ - { - "description": "a string is valid", - "data": {"foo": "bar"}, - "valid": true - }, - { - "description": "a non-string is invalid", - "data": {"foo": 12}, - "valid": false - } - ] - }, - { - "description": "ref with absolute-path-reference", - "schema": { - "$id": "http://example.com/ref/absref.json", - "definitions": { - "a": { - "$id": "http://example.com/ref/absref/foobar.json", - "type": "number" - }, - "b": { - "$id": "http://example.com/absref/foobar.json", - "type": "string" - } - }, - "allOf": [ - { "$ref": "/absref/foobar.json" } - ] - }, - "tests": [ - { - "description": "a string is valid", - "data": "foo", - "valid": true - }, - { - "description": "an integer is invalid", - "data": 12, - "valid": false - } - ] - }, - { - "description": "$id with file URI still resolves pointers - *nix", - "schema": { - "$id": "file:///folder/file.json", - "definitions": { - "foo": { - "type": "number" - } - }, - "allOf": [ - { - "$ref": "#/definitions/foo" - } - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "non-number is invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "$id with file URI still resolves pointers - windows", - "schema": { - "$id": "file:///c:/folder/file.json", - "definitions": { - "foo": { - "type": "number" - } - }, - "allOf": [ - { - "$ref": "#/definitions/foo" - } - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "non-number is invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "empty tokens in $ref json-pointer", - "schema": { - "definitions": { - "": { - "definitions": { - "": { "type": "number" } - } - } - }, - "allOf": [ - { - "$ref": "#/definitions//definitions/" - } - ] - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "non-number is invalid", - "data": "a", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/refRemote.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/refRemote.json deleted file mode 100644 index 28459c4a..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/refRemote.json +++ /dev/null @@ -1,257 +0,0 @@ -[ - { - "description": "remote ref", - "schema": {"$ref": "http://localhost:1234/integer.json"}, - "tests": [ - { - "description": "remote ref valid", - "data": 1, - "valid": true - }, - { - "description": "remote ref invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "fragment within remote ref", - "schema": {"$ref": "http://localhost:1234/subSchemas.json#/definitions/integer"}, - "tests": [ - { - "description": "remote fragment valid", - "data": 1, - "valid": true - }, - { - "description": "remote fragment invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "ref within remote ref", - "schema": { - "$ref": "http://localhost:1234/subSchemas.json#/definitions/refToInteger" - }, - "tests": [ - { - "description": "ref within ref valid", - "data": 1, - "valid": true - }, - { - "description": "ref within ref invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "base URI change", - "schema": { - "$id": "http://localhost:1234/", - "items": { - "$id": "baseUriChange/", - "items": {"$ref": "folderInteger.json"} - } - }, - "tests": [ - { - "description": "base URI change ref valid", - "data": [[1]], - "valid": true - }, - { - "description": "base URI change ref invalid", - "data": [["a"]], - "valid": false - } - ] - }, - { - "description": "base URI change - change folder", - "schema": { - "$id": "http://localhost:1234/scope_change_defs1.json", - "type" : "object", - "properties": { - "list": {"$ref": "#/definitions/baz"} - }, - "definitions": { - "baz": { - "$id": "baseUriChangeFolder/", - "type": "array", - "items": {"$ref": "folderInteger.json"} - } - } - }, - "tests": [ - { - "description": "number is valid", - "data": {"list": [1]}, - "valid": true - }, - { - "description": "string is invalid", - "data": {"list": ["a"]}, - "valid": false - } - ] - }, - { - "description": "base URI change - change folder in subschema", - "schema": { - "$id": "http://localhost:1234/scope_change_defs2.json", - "type" : "object", - "properties": { - "list": {"$ref": "#/definitions/baz/definitions/bar"} - }, - "definitions": { - "baz": { - "$id": "baseUriChangeFolderInSubschema/", - "definitions": { - "bar": { - "type": "array", - "items": {"$ref": "folderInteger.json"} - } - } - } - } - }, - "tests": [ - { - "description": "number is valid", - "data": {"list": [1]}, - "valid": true - }, - { - "description": "string is invalid", - "data": {"list": ["a"]}, - "valid": false - } - ] - }, - { - "description": "root ref in remote ref", - "schema": { - "$id": "http://localhost:1234/object", - "type": "object", - "properties": { - "name": {"$ref": "name.json#/definitions/orNull"} - } - }, - "tests": [ - { - "description": "string is valid", - "data": { - "name": "foo" - }, - "valid": true - }, - { - "description": "null is valid", - "data": { - "name": null - }, - "valid": true - }, - { - "description": "object is invalid", - "data": { - "name": { - "name": null - } - }, - "valid": false - } - ] - }, - { - "description": "remote ref with ref to definitions", - "schema": { - "$id": "http://localhost:1234/schema-remote-ref-ref-defs1.json", - "allOf": [ - { "$ref": "ref-and-definitions.json" } - ] - }, - "tests": [ - { - "description": "invalid", - "data": { - "bar": 1 - }, - "valid": false - }, - { - "description": "valid", - "data": { - "bar": "a" - }, - "valid": true - } - ] - }, - { - "description": "Location-independent identifier in remote ref", - "schema": { - "$ref": "http://localhost:1234/locationIndependentIdentifierPre2019.json#/definitions/refToInteger" - }, - "tests": [ - { - "description": "integer is valid", - "data": 1, - "valid": true - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "retrieved nested refs resolve relative to their URI not $id", - "schema": { - "$id": "http://localhost:1234/some-id", - "properties": { - "name": {"$ref": "nested/foo-ref-string.json"} - } - }, - "tests": [ - { - "description": "number is invalid", - "data": { - "name": {"foo": 1} - }, - "valid": false - }, - { - "description": "string is valid", - "data": { - "name": {"foo": "a"} - }, - "valid": true - } - ] - }, - { - "description": "$ref to $ref finds location-independent $id", - "schema": { - "$ref": "http://localhost:1234/draft6/detached-ref.json#/definitions/foo" - }, - "tests": [ - { - "description": "number is valid", - "data": 1, - "valid": true - }, - { - "description": "non-number is invalid", - "data": "a", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/required.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/required.json deleted file mode 100644 index 8d8087af..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/required.json +++ /dev/null @@ -1,151 +0,0 @@ -[ - { - "description": "required validation", - "schema": { - "properties": { - "foo": {}, - "bar": {} - }, - "required": ["foo"] - }, - "tests": [ - { - "description": "present required property is valid", - "data": {"foo": 1}, - "valid": true - }, - { - "description": "non-present required property is invalid", - "data": {"bar": 1}, - "valid": false - }, - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores strings", - "data": "", - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - } - ] - }, - { - "description": "required default validation", - "schema": { - "properties": { - "foo": {} - } - }, - "tests": [ - { - "description": "not required by default", - "data": {}, - "valid": true - } - ] - }, - { - "description": "required with empty array", - "schema": { - "properties": { - "foo": {} - }, - "required": [] - }, - "tests": [ - { - "description": "property not required", - "data": {}, - "valid": true - } - ] - }, - { - "description": "required with escaped characters", - "schema": { - "required": [ - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" - ] - }, - "tests": [ - { - "description": "object with all properties present is valid", - "data": { - "foo\nbar": 1, - "foo\"bar": 1, - "foo\\bar": 1, - "foo\rbar": 1, - "foo\tbar": 1, - "foo\fbar": 1 - }, - "valid": true - }, - { - "description": "object with some properties missing is invalid", - "data": { - "foo\nbar": "1", - "foo\"bar": "1" - }, - "valid": false - } - ] - }, - { - "description": "required properties whose names are Javascript object property names", - "comment": "Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object.", - "schema": { "required": ["__proto__", "toString", "constructor"] }, - "tests": [ - { - "description": "ignores arrays", - "data": [], - "valid": true - }, - { - "description": "ignores other non-objects", - "data": 12, - "valid": true - }, - { - "description": "none of the properties mentioned", - "data": {}, - "valid": false - }, - { - "description": "__proto__ present", - "data": { "__proto__": "foo" }, - "valid": false - }, - { - "description": "toString present", - "data": { "toString": { "length": 37 } }, - "valid": false - }, - { - "description": "constructor present", - "data": { "constructor": { "length": 37 } }, - "valid": false - }, - { - "description": "all present", - "data": { - "__proto__": 12, - "toString": { "length": "foo" }, - "constructor": 37 - }, - "valid": true - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/type.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/type.json deleted file mode 100644 index 83046470..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/type.json +++ /dev/null @@ -1,474 +0,0 @@ -[ - { - "description": "integer type matches integers", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "an integer is an integer", - "data": 1, - "valid": true - }, - { - "description": "a float with zero fractional part is an integer", - "data": 1.0, - "valid": true - }, - { - "description": "a float is not an integer", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not an integer", - "data": "foo", - "valid": false - }, - { - "description": "a string is still not an integer, even if it looks like one", - "data": "1", - "valid": false - }, - { - "description": "an object is not an integer", - "data": {}, - "valid": false - }, - { - "description": "an array is not an integer", - "data": [], - "valid": false - }, - { - "description": "a boolean is not an integer", - "data": true, - "valid": false - }, - { - "description": "null is not an integer", - "data": null, - "valid": false - } - ] - }, - { - "description": "number type matches numbers", - "schema": {"type": "number"}, - "tests": [ - { - "description": "an integer is a number", - "data": 1, - "valid": true - }, - { - "description": "a float with zero fractional part is a number (and an integer)", - "data": 1.0, - "valid": true - }, - { - "description": "a float is a number", - "data": 1.1, - "valid": true - }, - { - "description": "a string is not a number", - "data": "foo", - "valid": false - }, - { - "description": "a string is still not a number, even if it looks like one", - "data": "1", - "valid": false - }, - { - "description": "an object is not a number", - "data": {}, - "valid": false - }, - { - "description": "an array is not a number", - "data": [], - "valid": false - }, - { - "description": "a boolean is not a number", - "data": true, - "valid": false - }, - { - "description": "null is not a number", - "data": null, - "valid": false - } - ] - }, - { - "description": "string type matches strings", - "schema": {"type": "string"}, - "tests": [ - { - "description": "1 is not a string", - "data": 1, - "valid": false - }, - { - "description": "a float is not a string", - "data": 1.1, - "valid": false - }, - { - "description": "a string is a string", - "data": "foo", - "valid": true - }, - { - "description": "a string is still a string, even if it looks like a number", - "data": "1", - "valid": true - }, - { - "description": "an empty string is still a string", - "data": "", - "valid": true - }, - { - "description": "an object is not a string", - "data": {}, - "valid": false - }, - { - "description": "an array is not a string", - "data": [], - "valid": false - }, - { - "description": "a boolean is not a string", - "data": true, - "valid": false - }, - { - "description": "null is not a string", - "data": null, - "valid": false - } - ] - }, - { - "description": "object type matches objects", - "schema": {"type": "object"}, - "tests": [ - { - "description": "an integer is not an object", - "data": 1, - "valid": false - }, - { - "description": "a float is not an object", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not an object", - "data": "foo", - "valid": false - }, - { - "description": "an object is an object", - "data": {}, - "valid": true - }, - { - "description": "an array is not an object", - "data": [], - "valid": false - }, - { - "description": "a boolean is not an object", - "data": true, - "valid": false - }, - { - "description": "null is not an object", - "data": null, - "valid": false - } - ] - }, - { - "description": "array type matches arrays", - "schema": {"type": "array"}, - "tests": [ - { - "description": "an integer is not an array", - "data": 1, - "valid": false - }, - { - "description": "a float is not an array", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not an array", - "data": "foo", - "valid": false - }, - { - "description": "an object is not an array", - "data": {}, - "valid": false - }, - { - "description": "an array is an array", - "data": [], - "valid": true - }, - { - "description": "a boolean is not an array", - "data": true, - "valid": false - }, - { - "description": "null is not an array", - "data": null, - "valid": false - } - ] - }, - { - "description": "boolean type matches booleans", - "schema": {"type": "boolean"}, - "tests": [ - { - "description": "an integer is not a boolean", - "data": 1, - "valid": false - }, - { - "description": "zero is not a boolean", - "data": 0, - "valid": false - }, - { - "description": "a float is not a boolean", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not a boolean", - "data": "foo", - "valid": false - }, - { - "description": "an empty string is not a boolean", - "data": "", - "valid": false - }, - { - "description": "an object is not a boolean", - "data": {}, - "valid": false - }, - { - "description": "an array is not a boolean", - "data": [], - "valid": false - }, - { - "description": "true is a boolean", - "data": true, - "valid": true - }, - { - "description": "false is a boolean", - "data": false, - "valid": true - }, - { - "description": "null is not a boolean", - "data": null, - "valid": false - } - ] - }, - { - "description": "null type matches only the null object", - "schema": {"type": "null"}, - "tests": [ - { - "description": "an integer is not null", - "data": 1, - "valid": false - }, - { - "description": "a float is not null", - "data": 1.1, - "valid": false - }, - { - "description": "zero is not null", - "data": 0, - "valid": false - }, - { - "description": "a string is not null", - "data": "foo", - "valid": false - }, - { - "description": "an empty string is not null", - "data": "", - "valid": false - }, - { - "description": "an object is not null", - "data": {}, - "valid": false - }, - { - "description": "an array is not null", - "data": [], - "valid": false - }, - { - "description": "true is not null", - "data": true, - "valid": false - }, - { - "description": "false is not null", - "data": false, - "valid": false - }, - { - "description": "null is null", - "data": null, - "valid": true - } - ] - }, - { - "description": "multiple types can be specified in an array", - "schema": {"type": ["integer", "string"]}, - "tests": [ - { - "description": "an integer is valid", - "data": 1, - "valid": true - }, - { - "description": "a string is valid", - "data": "foo", - "valid": true - }, - { - "description": "a float is invalid", - "data": 1.1, - "valid": false - }, - { - "description": "an object is invalid", - "data": {}, - "valid": false - }, - { - "description": "an array is invalid", - "data": [], - "valid": false - }, - { - "description": "a boolean is invalid", - "data": true, - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - } - ] - }, - { - "description": "type as array with one item", - "schema": { - "type": ["string"] - }, - "tests": [ - { - "description": "string is valid", - "data": "foo", - "valid": true - }, - { - "description": "number is invalid", - "data": 123, - "valid": false - } - ] - }, - { - "description": "type: array or object", - "schema": { - "type": ["array", "object"] - }, - "tests": [ - { - "description": "array is valid", - "data": [1,2,3], - "valid": true - }, - { - "description": "object is valid", - "data": {"foo": 123}, - "valid": true - }, - { - "description": "number is invalid", - "data": 123, - "valid": false - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - } - ] - }, - { - "description": "type: array, object or null", - "schema": { - "type": ["array", "object", "null"] - }, - "tests": [ - { - "description": "array is valid", - "data": [1,2,3], - "valid": true - }, - { - "description": "object is valid", - "data": {"foo": 123}, - "valid": true - }, - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "number is invalid", - "data": 123, - "valid": false - }, - { - "description": "string is invalid", - "data": "foo", - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/uniqueItems.json b/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/uniqueItems.json deleted file mode 100644 index d2730c60..00000000 --- a/vendor/jsontoolkit/vendor/jsonschema-test-suite/tests/draft6/uniqueItems.json +++ /dev/null @@ -1,409 +0,0 @@ -[ - { - "description": "uniqueItems validation", - "schema": {"uniqueItems": true}, - "tests": [ - { - "description": "unique array of integers is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "non-unique array of integers is invalid", - "data": [1, 1], - "valid": false - }, - { - "description": "non-unique array of more than two integers is invalid", - "data": [1, 2, 1], - "valid": false - }, - { - "description": "numbers are unique if mathematically unequal", - "data": [1.0, 1.00, 1], - "valid": false - }, - { - "description": "false is not equal to zero", - "data": [0, false], - "valid": true - }, - { - "description": "true is not equal to one", - "data": [1, true], - "valid": true - }, - { - "description": "unique array of strings is valid", - "data": ["foo", "bar", "baz"], - "valid": true - }, - { - "description": "non-unique array of strings is invalid", - "data": ["foo", "bar", "foo"], - "valid": false - }, - { - "description": "unique array of objects is valid", - "data": [{"foo": "bar"}, {"foo": "baz"}], - "valid": true - }, - { - "description": "non-unique array of objects is invalid", - "data": [{"foo": "bar"}, {"foo": "bar"}], - "valid": false - }, - { - "description": "property order of array of objects is ignored", - "data": [{"foo": "bar", "bar": "foo"}, {"bar": "foo", "foo": "bar"}], - "valid": false - }, - { - "description": "unique array of nested objects is valid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : false}}} - ], - "valid": true - }, - { - "description": "non-unique array of nested objects is invalid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : true}}} - ], - "valid": false - }, - { - "description": "unique array of arrays is valid", - "data": [["foo"], ["bar"]], - "valid": true - }, - { - "description": "non-unique array of arrays is invalid", - "data": [["foo"], ["foo"]], - "valid": false - }, - { - "description": "non-unique array of more than two arrays is invalid", - "data": [["foo"], ["bar"], ["foo"]], - "valid": false - }, - { - "description": "1 and true are unique", - "data": [1, true], - "valid": true - }, - { - "description": "0 and false are unique", - "data": [0, false], - "valid": true - }, - { - "description": "[1] and [true] are unique", - "data": [[1], [true]], - "valid": true - }, - { - "description": "[0] and [false] are unique", - "data": [[0], [false]], - "valid": true - }, - { - "description": "nested [1] and [true] are unique", - "data": [[[1], "foo"], [[true], "foo"]], - "valid": true - }, - { - "description": "nested [0] and [false] are unique", - "data": [[[0], "foo"], [[false], "foo"]], - "valid": true - }, - { - "description": "unique heterogeneous types are valid", - "data": [{}, [1], true, null, 1, "{}"], - "valid": true - }, - { - "description": "non-unique heterogeneous types are invalid", - "data": [{}, [1], true, null, {}, 1], - "valid": false - }, - { - "description": "different objects are unique", - "data": [{"a": 1, "b": 2}, {"a": 2, "b": 1}], - "valid": true - }, - { - "description": "objects are non-unique despite key order", - "data": [{"a": 1, "b": 2}, {"b": 2, "a": 1}], - "valid": false - }, - { - "description": "{\"a\": false} and {\"a\": 0} are unique", - "data": [{"a": false}, {"a": 0}], - "valid": true - }, - { - "description": "{\"a\": true} and {\"a\": 1} are unique", - "data": [{"a": true}, {"a": 1}], - "valid": true - } - ] - }, - { - "description": "uniqueItems with an array of items", - "schema": { - "items": [{"type": "boolean"}, {"type": "boolean"}], - "uniqueItems": true - }, - "tests": [ - { - "description": "[false, true] from items array is valid", - "data": [false, true], - "valid": true - }, - { - "description": "[true, false] from items array is valid", - "data": [true, false], - "valid": true - }, - { - "description": "[false, false] from items array is not valid", - "data": [false, false], - "valid": false - }, - { - "description": "[true, true] from items array is not valid", - "data": [true, true], - "valid": false - }, - { - "description": "unique array extended from [false, true] is valid", - "data": [false, true, "foo", "bar"], - "valid": true - }, - { - "description": "unique array extended from [true, false] is valid", - "data": [true, false, "foo", "bar"], - "valid": true - }, - { - "description": "non-unique array extended from [false, true] is not valid", - "data": [false, true, "foo", "foo"], - "valid": false - }, - { - "description": "non-unique array extended from [true, false] is not valid", - "data": [true, false, "foo", "foo"], - "valid": false - } - ] - }, - { - "description": "uniqueItems with an array of items and additionalItems=false", - "schema": { - "items": [{"type": "boolean"}, {"type": "boolean"}], - "uniqueItems": true, - "additionalItems": false - }, - "tests": [ - { - "description": "[false, true] from items array is valid", - "data": [false, true], - "valid": true - }, - { - "description": "[true, false] from items array is valid", - "data": [true, false], - "valid": true - }, - { - "description": "[false, false] from items array is not valid", - "data": [false, false], - "valid": false - }, - { - "description": "[true, true] from items array is not valid", - "data": [true, true], - "valid": false - }, - { - "description": "extra items are invalid even if unique", - "data": [false, true, null], - "valid": false - } - ] - }, - { - "description": "uniqueItems=false validation", - "schema": { "uniqueItems": false }, - "tests": [ - { - "description": "unique array of integers is valid", - "data": [1, 2], - "valid": true - }, - { - "description": "non-unique array of integers is valid", - "data": [1, 1], - "valid": true - }, - { - "description": "numbers are unique if mathematically unequal", - "data": [1.0, 1.00, 1], - "valid": true - }, - { - "description": "false is not equal to zero", - "data": [0, false], - "valid": true - }, - { - "description": "true is not equal to one", - "data": [1, true], - "valid": true - }, - { - "description": "unique array of objects is valid", - "data": [{"foo": "bar"}, {"foo": "baz"}], - "valid": true - }, - { - "description": "non-unique array of objects is valid", - "data": [{"foo": "bar"}, {"foo": "bar"}], - "valid": true - }, - { - "description": "unique array of nested objects is valid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : false}}} - ], - "valid": true - }, - { - "description": "non-unique array of nested objects is valid", - "data": [ - {"foo": {"bar" : {"baz" : true}}}, - {"foo": {"bar" : {"baz" : true}}} - ], - "valid": true - }, - { - "description": "unique array of arrays is valid", - "data": [["foo"], ["bar"]], - "valid": true - }, - { - "description": "non-unique array of arrays is valid", - "data": [["foo"], ["foo"]], - "valid": true - }, - { - "description": "1 and true are unique", - "data": [1, true], - "valid": true - }, - { - "description": "0 and false are unique", - "data": [0, false], - "valid": true - }, - { - "description": "unique heterogeneous types are valid", - "data": [{}, [1], true, null, 1], - "valid": true - }, - { - "description": "non-unique heterogeneous types are valid", - "data": [{}, [1], true, null, {}, 1], - "valid": true - } - ] - }, - { - "description": "uniqueItems=false with an array of items", - "schema": { - "items": [{"type": "boolean"}, {"type": "boolean"}], - "uniqueItems": false - }, - "tests": [ - { - "description": "[false, true] from items array is valid", - "data": [false, true], - "valid": true - }, - { - "description": "[true, false] from items array is valid", - "data": [true, false], - "valid": true - }, - { - "description": "[false, false] from items array is valid", - "data": [false, false], - "valid": true - }, - { - "description": "[true, true] from items array is valid", - "data": [true, true], - "valid": true - }, - { - "description": "unique array extended from [false, true] is valid", - "data": [false, true, "foo", "bar"], - "valid": true - }, - { - "description": "unique array extended from [true, false] is valid", - "data": [true, false, "foo", "bar"], - "valid": true - }, - { - "description": "non-unique array extended from [false, true] is valid", - "data": [false, true, "foo", "foo"], - "valid": true - }, - { - "description": "non-unique array extended from [true, false] is valid", - "data": [true, false, "foo", "foo"], - "valid": true - } - ] - }, - { - "description": "uniqueItems=false with an array of items and additionalItems=false", - "schema": { - "items": [{"type": "boolean"}, {"type": "boolean"}], - "uniqueItems": false, - "additionalItems": false - }, - "tests": [ - { - "description": "[false, true] from items array is valid", - "data": [false, true], - "valid": true - }, - { - "description": "[true, false] from items array is valid", - "data": [true, false], - "valid": true - }, - { - "description": "[false, false] from items array is valid", - "data": [false, false], - "valid": true - }, - { - "description": "[true, true] from items array is valid", - "data": [true, true], - "valid": true - }, - { - "description": "extra items are invalid even if unique", - "data": [false, true, null], - "valid": false - } - ] - } -] diff --git a/vendor/jsontoolkit/vendor/noa/cmake/noa.cmake b/vendor/jsontoolkit/vendor/noa/cmake/noa.cmake index 71b9247d..d55ca540 100644 --- a/vendor/jsontoolkit/vendor/noa/cmake/noa.cmake +++ b/vendor/jsontoolkit/vendor/noa/cmake/noa.cmake @@ -2,8 +2,9 @@ set(NOA_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/noa") include("${NOA_DIRECTORY}/shim.cmake") include("${NOA_DIRECTORY}/variables.cmake") include("${NOA_DIRECTORY}/defaults.cmake") -include("${NOA_DIRECTORY}/library.cmake") include("${NOA_DIRECTORY}/compiler/sanitizer.cmake") +include("${NOA_DIRECTORY}/compiler/options.cmake") +include("${NOA_DIRECTORY}/library.cmake") include("${NOA_DIRECTORY}/options/enum.cmake") include("${NOA_DIRECTORY}/commands/copy-file.cmake") include("${NOA_DIRECTORY}/targets/clang-format.cmake") diff --git a/vendor/jsontoolkit/cmake/CompilerOptions.cmake b/vendor/jsontoolkit/vendor/noa/cmake/noa/compiler/options.cmake similarity index 70% rename from vendor/jsontoolkit/cmake/CompilerOptions.cmake rename to vendor/jsontoolkit/vendor/noa/cmake/noa/compiler/options.cmake index 3b73ddb4..c8597818 100644 --- a/vendor/jsontoolkit/cmake/CompilerOptions.cmake +++ b/vendor/jsontoolkit/vendor/noa/cmake/noa/compiler/options.cmake @@ -1,7 +1,7 @@ -function(sourcemeta_jsontoolkit_add_compile_options target) +function(noa_add_default_options visibility target) if(NOA_COMPILER_MSVC) # See https://learn.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-by-category - target_compile_options("${target}" PRIVATE + target_compile_options("${target}" ${visibility} /options:strict /permissive- /W4 @@ -9,7 +9,7 @@ function(sourcemeta_jsontoolkit_add_compile_options target) /MP /sdl) else() - target_compile_options("${target}" PRIVATE + target_compile_options("${target}" ${visibility} -Wall -Wextra -Wpedantic @@ -39,11 +39,17 @@ function(sourcemeta_jsontoolkit_add_compile_options target) -Wunknown-pragmas -Wnon-virtual-dtor -Woverloaded-virtual - -Winvalid-offsetof) + -Winvalid-offsetof + + # Assume that signed arithmetic overflow of addition, subtraction and + # multiplication wraps around using twos-complement representation + # See https://users.cs.utah.edu/~regehr/papers/overflow12.pdf + # See https://www.postgresql.org/message-id/1689.1134422394@sss.pgh.pa.us + -fwrapv) endif() if(NOA_COMPILER_LLVM) - target_compile_options("${target}" PRIVATE + target_compile_options("${target}" ${visibility} -Wbool-conversion -Wint-conversion -Wpointer-sign @@ -60,6 +66,7 @@ function(sourcemeta_jsontoolkit_add_compile_options target) -Wdocumentation -Wmove -Wc++11-extensions + -Wcomma -Wno-exit-time-destructors -Wrange-loop-analysis) endif() diff --git a/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake b/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake index dd7019a5..56e152b6 100644 --- a/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake +++ b/vendor/jsontoolkit/vendor/noa/cmake/noa/library.cmake @@ -40,9 +40,11 @@ function(noa_library) if(NOA_LIBRARY_SOURCES) add_library(${TARGET_NAME} ${PUBLIC_HEADER} ${ABSOLUTE_PRIVATE_HEADERS} ${NOA_LIBRARY_SOURCES}) + noa_add_default_options(PRIVATE ${TARGET_NAME}) else() add_library(${TARGET_NAME} INTERFACE ${PUBLIC_HEADER} ${ABSOLUTE_PRIVATE_HEADERS}) + noa_add_default_options(INTERFACE ${TARGET_NAME}) endif() add_library(${ALIAS_NAME} ALIAS ${TARGET_NAME})