From 8b07a0ea8d5af209f3547be791ccabc68ddc3735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flor=20Chac=C3=B3n?= Date: Fri, 10 Jun 2022 11:38:26 -0700 Subject: [PATCH] Delete unneeded test code from libraries pulled as subtrees (#2232) Deleting the test code from the valijson library that we include as a subtree. This is mainly to prevent some issues we have with static code analysis that warns of issues here, like invalid JSON files and issues with the use of NPM packages. --- .../documents/array_doubles_10_20_30_40.json | 1 - .../data/documents/array_doubles_1_2_3.json | 1 - .../data/documents/array_doubles_1_2_3_4.json | 1 - .../tests/data/documents/array_empty.json | 1 - .../documents/array_integers_10_20_30_40.json | 1 - .../data/documents/array_integers_1_2_3.json | 1 - .../documents/array_integers_1_2_3_4.json | 1 - .../documents/array_strings_10_20_30_40.json | 1 - .../data/documents/array_strings_1_2_3.json | 1 - .../data/documents/array_strings_1_2_3_4.json | 1 - .../tests/data/documents/object_empty.json | 1 - .../allof_integers_and_numbers.schema.json | 20 - .../valijson/tests/fuzzing/fuzzer.cpp | 43 -- .../valijson/tests/fuzzing/oss-fuzz-build.sh | 32 - .../tests/test_adapter_comparison.cpp | 614 ------------------ .../tests/test_boost_json_adapter.cpp | 89 --- ...t_fetch_absolute_uri_document_callback.cpp | 80 --- .../test_fetch_urn_document_callback.cpp | 80 --- .../valijson/tests/test_json11_adapter.cpp | 84 --- .../valijson/tests/test_json_pointer.cpp | 309 --------- .../valijson/tests/test_jsoncpp_adapter.cpp | 83 --- .../tests/test_nlohmann_json_adapter.cpp | 83 --- .../valijson/tests/test_picojson_adapter.cpp | 88 --- .../valijson/tests/test_poco_json_adapter.cpp | 84 --- .../valijson/tests/test_poly_constraint.cpp | 97 --- .../tests/test_property_tree_adapter.cpp | 91 --- .../valijson/tests/test_qtjson_adapter.cpp | 84 --- .../valijson/tests/test_rapidjson_adapter.cpp | 113 ---- .../valijson/tests/test_validation_errors.cpp | 100 --- .../valijson/tests/test_validator.cpp | 607 ----------------- .../JSON-Schema-Test-Suite/.gitignore | 1 - .../JSON-Schema-Test-Suite/.travis.yml | 9 - .../thirdparty/JSON-Schema-Test-Suite/LICENSE | 19 - .../JSON-Schema-Test-Suite/README.md | 181 ------ .../JSON-Schema-Test-Suite/index.js | 45 -- .../JSON-Schema-Test-Suite/package.json | 28 - .../remotes/folder/folderInteger.json | 3 - .../remotes/integer.json | 3 - .../remotes/name-defs.json | 11 - .../JSON-Schema-Test-Suite/remotes/name.json | 11 - .../remotes/subSchemas.json | 8 - .../JSON-Schema-Test-Suite/test-schema.json | 59 -- .../tests/draft2019-08/additionalItems.json | 87 --- .../draft2019-08/additionalProperties.json | 133 ---- .../tests/draft2019-08/allOf.json | 218 ------- .../tests/draft2019-08/anyOf.json | 189 ------ .../tests/draft2019-08/boolean_schema.json | 104 --- .../tests/draft2019-08/const.json | 170 ----- .../tests/draft2019-08/contains.json | 95 --- .../tests/draft2019-08/default.json | 49 -- .../tests/draft2019-08/defs.json | 24 - .../tests/draft2019-08/dependencies.json | 268 -------- .../tests/draft2019-08/enum.json | 179 ----- .../tests/draft2019-08/exclusiveMaximum.json | 30 - .../tests/draft2019-08/exclusiveMinimum.json | 30 - .../tests/draft2019-08/if-then-else.json | 188 ------ .../tests/draft2019-08/items.json | 250 ------- .../tests/draft2019-08/maxItems.json | 28 - .../tests/draft2019-08/maxLength.json | 33 - .../tests/draft2019-08/maxProperties.json | 38 -- .../tests/draft2019-08/maximum.json | 28 - .../tests/draft2019-08/minItems.json | 28 - .../tests/draft2019-08/minLength.json | 33 - .../tests/draft2019-08/minProperties.json | 38 -- .../tests/draft2019-08/minimum.json | 59 -- .../tests/draft2019-08/multipleOf.json | 60 -- .../tests/draft2019-08/not.json | 117 ---- .../tests/draft2019-08/oneOf.json | 206 ------ .../tests/draft2019-08/optional/bignum.json | 105 --- .../tests/draft2019-08/optional/content.json | 77 --- .../optional/ecmascript-regex.json | 13 - .../optional/format/date-time.json | 53 -- .../draft2019-08/optional/format/date.json | 23 - .../draft2019-08/optional/format/email.json | 18 - .../optional/format/hostname.json | 33 - .../optional/format/idn-email.json | 18 - .../optional/format/idn-hostname.json | 28 - .../draft2019-08/optional/format/ipv4.json | 33 - .../draft2019-08/optional/format/ipv6.json | 28 - .../optional/format/iri-reference.json | 43 -- .../draft2019-08/optional/format/iri.json | 53 -- .../optional/format/json-pointer.json | 168 ----- .../draft2019-08/optional/format/regex.json | 18 - .../format/relative-json-pointer.json | 33 - .../draft2019-08/optional/format/time.json | 23 - .../optional/format/uri-reference.json | 43 -- .../optional/format/uri-template.json | 30 - .../draft2019-08/optional/format/uri.json | 103 --- .../optional/zeroTerminatedFloats.json | 15 - .../tests/draft2019-08/pattern.json | 34 - .../tests/draft2019-08/patternProperties.json | 151 ----- .../tests/draft2019-08/properties.json | 167 ----- .../tests/draft2019-08/propertyNames.json | 78 --- .../tests/draft2019-08/ref.json | 443 ------------- .../tests/draft2019-08/refRemote.json | 167 ----- .../tests/draft2019-08/required.json | 105 --- .../tests/draft2019-08/type.json | 464 ------------- .../tests/draft2019-08/uniqueItems.json | 89 --- .../tests/draft3/additionalItems.json | 82 --- .../tests/draft3/additionalProperties.json | 133 ---- .../tests/draft3/default.json | 49 -- .../tests/draft3/dependencies.json | 118 ---- .../tests/draft3/disallow.json | 80 --- .../tests/draft3/divisibleBy.json | 60 -- .../tests/draft3/enum.json | 71 -- .../tests/draft3/extends.json | 94 --- .../tests/draft3/items.json | 46 -- .../tests/draft3/maxItems.json | 28 - .../tests/draft3/maxLength.json | 33 - .../tests/draft3/maximum.json | 42 -- .../tests/draft3/minItems.json | 28 - .../tests/draft3/minLength.json | 33 - .../tests/draft3/minimum.json | 73 --- .../tests/draft3/optional/bignum.json | 107 --- .../tests/draft3/optional/format.json | 227 ------- .../tests/draft3/optional/jsregex.json | 18 - .../draft3/optional/zeroTerminatedFloats.json | 15 - .../tests/draft3/pattern.json | 34 - .../tests/draft3/patternProperties.json | 115 ---- .../tests/draft3/properties.json | 97 --- .../tests/draft3/ref.json | 192 ------ .../tests/draft3/refRemote.json | 74 --- .../tests/draft3/required.json | 53 -- .../tests/draft3/type.json | 489 -------------- .../tests/draft3/uniqueItems.json | 79 --- .../tests/draft4/additionalItems.json | 87 --- .../tests/draft4/additionalProperties.json | 133 ---- .../tests/draft4/allOf.json | 185 ------ .../tests/draft4/anyOf.json | 156 ----- .../tests/draft4/default.json | 49 -- .../tests/draft4/definitions.json | 32 - .../tests/draft4/dependencies.json | 194 ------ .../tests/draft4/enum.json | 179 ----- .../tests/draft4/items.json | 195 ------ .../tests/draft4/maxItems.json | 28 - .../tests/draft4/maxLength.json | 33 - .../tests/draft4/maxProperties.json | 38 -- .../tests/draft4/maximum.json | 73 --- .../tests/draft4/minItems.json | 28 - .../tests/draft4/minLength.json | 33 - .../tests/draft4/minProperties.json | 38 -- .../tests/draft4/minimum.json | 104 --- .../tests/draft4/multipleOf.json | 60 -- .../tests/draft4/not.json | 96 --- .../tests/draft4/oneOf.json | 162 ----- .../tests/draft4/optional/bignum.json | 107 --- .../draft4/optional/ecmascript-regex.json | 13 - .../tests/draft4/optional/format.json | 253 -------- .../draft4/optional/zeroTerminatedFloats.json | 15 - .../tests/draft4/pattern.json | 34 - .../tests/draft4/patternProperties.json | 120 ---- .../tests/draft4/properties.json | 136 ---- .../tests/draft4/ref.json | 411 ------------ .../tests/draft4/refRemote.json | 171 ----- .../tests/draft4/required.json | 89 --- .../tests/draft4/type.json | 464 ------------- .../tests/draft4/uniqueItems.json | 89 --- .../tests/draft6/additionalItems.json | 87 --- .../tests/draft6/additionalProperties.json | 133 ---- .../tests/draft6/allOf.json | 218 ------- .../tests/draft6/anyOf.json | 189 ------ .../tests/draft6/boolean_schema.json | 104 --- .../tests/draft6/const.json | 170 ----- .../tests/draft6/contains.json | 100 --- .../tests/draft6/default.json | 49 -- .../tests/draft6/definitions.json | 32 - .../tests/draft6/dependencies.json | 268 -------- .../tests/draft6/enum.json | 179 ----- .../tests/draft6/exclusiveMaximum.json | 30 - .../tests/draft6/exclusiveMinimum.json | 30 - .../tests/draft6/items.json | 250 ------- .../tests/draft6/maxItems.json | 28 - .../tests/draft6/maxLength.json | 33 - .../tests/draft6/maxProperties.json | 38 -- .../tests/draft6/maximum.json | 28 - .../tests/draft6/minItems.json | 28 - .../tests/draft6/minLength.json | 33 - .../tests/draft6/minProperties.json | 38 -- .../tests/draft6/minimum.json | 59 -- .../tests/draft6/multipleOf.json | 60 -- .../tests/draft6/not.json | 117 ---- .../tests/draft6/oneOf.json | 206 ------ .../tests/draft6/optional/bignum.json | 105 --- .../draft6/optional/ecmascript-regex.json | 13 - .../tests/draft6/optional/format.json | 493 -------------- .../draft6/optional/zeroTerminatedFloats.json | 15 - .../tests/draft6/pattern.json | 34 - .../tests/draft6/patternProperties.json | 151 ----- .../tests/draft6/properties.json | 167 ----- .../tests/draft6/propertyNames.json | 78 --- .../tests/draft6/ref.json | 443 ------------- .../tests/draft6/refRemote.json | 171 ----- .../tests/draft6/required.json | 105 --- .../tests/draft6/type.json | 464 ------------- .../tests/draft6/uniqueItems.json | 89 --- .../tests/draft7/additionalItems.json | 87 --- .../tests/draft7/additionalProperties.json | 133 ---- .../tests/draft7/allOf.json | 218 ------- .../tests/draft7/anyOf.json | 189 ------ .../tests/draft7/boolean_schema.json | 104 --- .../tests/draft7/const.json | 170 ----- .../tests/draft7/contains.json | 100 --- .../tests/draft7/default.json | 49 -- .../tests/draft7/definitions.json | 32 - .../tests/draft7/dependencies.json | 268 -------- .../tests/draft7/enum.json | 179 ----- .../tests/draft7/exclusiveMaximum.json | 30 - .../tests/draft7/exclusiveMinimum.json | 30 - .../tests/draft7/if-then-else.json | 188 ------ .../tests/draft7/items.json | 250 ------- .../tests/draft7/maxItems.json | 28 - .../tests/draft7/maxLength.json | 33 - .../tests/draft7/maxProperties.json | 38 -- .../tests/draft7/maximum.json | 28 - .../tests/draft7/minItems.json | 28 - .../tests/draft7/minLength.json | 33 - .../tests/draft7/minProperties.json | 38 -- .../tests/draft7/minimum.json | 59 -- .../tests/draft7/multipleOf.json | 60 -- .../tests/draft7/not.json | 117 ---- .../tests/draft7/oneOf.json | 206 ------ .../tests/draft7/optional/bignum.json | 105 --- .../tests/draft7/optional/content.json | 77 --- .../draft7/optional/ecmascript-regex.json | 13 - .../draft7/optional/format/date-time.json | 53 -- .../tests/draft7/optional/format/date.json | 23 - .../tests/draft7/optional/format/email.json | 18 - .../draft7/optional/format/hostname.json | 33 - .../draft7/optional/format/idn-email.json | 18 - .../draft7/optional/format/idn-hostname.json | 28 - .../tests/draft7/optional/format/ipv4.json | 33 - .../tests/draft7/optional/format/ipv6.json | 28 - .../draft7/optional/format/iri-reference.json | 43 -- .../tests/draft7/optional/format/iri.json | 53 -- .../draft7/optional/format/json-pointer.json | 168 ----- .../tests/draft7/optional/format/regex.json | 18 - .../format/relative-json-pointer.json | 33 - .../tests/draft7/optional/format/time.json | 23 - .../draft7/optional/format/uri-reference.json | 43 -- .../draft7/optional/format/uri-template.json | 30 - .../tests/draft7/optional/format/uri.json | 103 --- .../draft7/optional/zeroTerminatedFloats.json | 15 - .../tests/draft7/pattern.json | 34 - .../tests/draft7/patternProperties.json | 151 ----- .../tests/draft7/properties.json | 167 ----- .../tests/draft7/propertyNames.json | 78 --- .../tests/draft7/ref.json | 443 ------------- .../tests/draft7/refRemote.json | 171 ----- .../tests/draft7/required.json | 105 --- .../tests/draft7/type.json | 464 ------------- .../tests/draft7/uniqueItems.json | 89 --- .../thirdparty/JSON-Schema-Test-Suite/tox.ini | 8 - 252 files changed, 24981 deletions(-) delete mode 100644 src/Valijson/valijson/tests/data/documents/array_doubles_10_20_30_40.json delete mode 100644 src/Valijson/valijson/tests/data/documents/array_doubles_1_2_3.json delete mode 100644 src/Valijson/valijson/tests/data/documents/array_doubles_1_2_3_4.json delete mode 100644 src/Valijson/valijson/tests/data/documents/array_empty.json delete mode 100644 src/Valijson/valijson/tests/data/documents/array_integers_10_20_30_40.json delete mode 100644 src/Valijson/valijson/tests/data/documents/array_integers_1_2_3.json delete mode 100644 src/Valijson/valijson/tests/data/documents/array_integers_1_2_3_4.json delete mode 100644 src/Valijson/valijson/tests/data/documents/array_strings_10_20_30_40.json delete mode 100644 src/Valijson/valijson/tests/data/documents/array_strings_1_2_3.json delete mode 100644 src/Valijson/valijson/tests/data/documents/array_strings_1_2_3_4.json delete mode 100644 src/Valijson/valijson/tests/data/documents/object_empty.json delete mode 100644 src/Valijson/valijson/tests/data/schemas/allof_integers_and_numbers.schema.json delete mode 100644 src/Valijson/valijson/tests/fuzzing/fuzzer.cpp delete mode 100755 src/Valijson/valijson/tests/fuzzing/oss-fuzz-build.sh delete mode 100644 src/Valijson/valijson/tests/test_adapter_comparison.cpp delete mode 100644 src/Valijson/valijson/tests/test_boost_json_adapter.cpp delete mode 100644 src/Valijson/valijson/tests/test_fetch_absolute_uri_document_callback.cpp delete mode 100644 src/Valijson/valijson/tests/test_fetch_urn_document_callback.cpp delete mode 100644 src/Valijson/valijson/tests/test_json11_adapter.cpp delete mode 100644 src/Valijson/valijson/tests/test_json_pointer.cpp delete mode 100644 src/Valijson/valijson/tests/test_jsoncpp_adapter.cpp delete mode 100644 src/Valijson/valijson/tests/test_nlohmann_json_adapter.cpp delete mode 100644 src/Valijson/valijson/tests/test_picojson_adapter.cpp delete mode 100644 src/Valijson/valijson/tests/test_poco_json_adapter.cpp delete mode 100644 src/Valijson/valijson/tests/test_poly_constraint.cpp delete mode 100644 src/Valijson/valijson/tests/test_property_tree_adapter.cpp delete mode 100644 src/Valijson/valijson/tests/test_qtjson_adapter.cpp delete mode 100644 src/Valijson/valijson/tests/test_rapidjson_adapter.cpp delete mode 100644 src/Valijson/valijson/tests/test_validation_errors.cpp delete mode 100644 src/Valijson/valijson/tests/test_validator.cpp delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/.gitignore delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/.travis.yml delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/LICENSE delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/README.md delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/index.js delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/package.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/folder/folderInteger.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/integer.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/name-defs.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/name.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/subSchemas.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/test-schema.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/additionalItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/additionalProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/allOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/anyOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/boolean_schema.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/const.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/contains.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/default.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/defs.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/dependencies.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/enum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/exclusiveMaximum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/exclusiveMinimum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/if-then-else.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/items.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maximum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minimum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/multipleOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/not.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/oneOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/bignum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/content.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/ecmascript-regex.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/date-time.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/date.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/email.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/hostname.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/idn-email.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/idn-hostname.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/ipv4.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/ipv6.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/iri-reference.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/iri.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/json-pointer.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/regex.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/relative-json-pointer.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/time.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri-reference.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri-template.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/zeroTerminatedFloats.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/pattern.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/patternProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/properties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/propertyNames.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/ref.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/refRemote.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/required.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/type.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/uniqueItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/additionalItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/additionalProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/default.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/dependencies.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/disallow.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/divisibleBy.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/enum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/extends.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/items.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maxItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maxLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maximum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minimum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/bignum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/format.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/jsregex.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/zeroTerminatedFloats.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/pattern.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/patternProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/properties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/ref.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/refRemote.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/required.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/type.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/uniqueItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/additionalItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/additionalProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/allOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/anyOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/default.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/definitions.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/dependencies.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/enum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/items.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maximum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minimum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/multipleOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/not.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/oneOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/bignum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/ecmascript-regex.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/format.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/zeroTerminatedFloats.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/pattern.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/patternProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/properties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/ref.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/refRemote.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/required.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/type.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/uniqueItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/additionalItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/additionalProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/allOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/anyOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/boolean_schema.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/const.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/contains.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/default.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/definitions.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/dependencies.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/enum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/exclusiveMaximum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/exclusiveMinimum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/items.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maximum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minimum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/multipleOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/not.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/oneOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/bignum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/ecmascript-regex.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/format.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/zeroTerminatedFloats.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/pattern.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/patternProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/properties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/propertyNames.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/ref.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/refRemote.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/required.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/type.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/uniqueItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/additionalItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/additionalProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/allOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/anyOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/boolean_schema.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/const.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/contains.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/default.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/definitions.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/dependencies.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/enum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/exclusiveMaximum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/exclusiveMinimum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/if-then-else.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/items.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maximum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minLength.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minimum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/multipleOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/not.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/oneOf.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/bignum.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/content.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/ecmascript-regex.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/date-time.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/date.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/email.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/hostname.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-email.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-hostname.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv4.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv6.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri-reference.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/json-pointer.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/regex.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/relative-json-pointer.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/time.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri-reference.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri-template.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/zeroTerminatedFloats.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/pattern.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/patternProperties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/properties.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/propertyNames.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/ref.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/refRemote.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/required.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/type.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/uniqueItems.json delete mode 100644 src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tox.ini diff --git a/src/Valijson/valijson/tests/data/documents/array_doubles_10_20_30_40.json b/src/Valijson/valijson/tests/data/documents/array_doubles_10_20_30_40.json deleted file mode 100644 index 96f28b2f7a..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_doubles_10_20_30_40.json +++ /dev/null @@ -1 +0,0 @@ -[10.0, 20.0, 30.0, 40.0] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/array_doubles_1_2_3.json b/src/Valijson/valijson/tests/data/documents/array_doubles_1_2_3.json deleted file mode 100644 index e7315bc142..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_doubles_1_2_3.json +++ /dev/null @@ -1 +0,0 @@ -[1.0, 2.0, 3.0] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/array_doubles_1_2_3_4.json b/src/Valijson/valijson/tests/data/documents/array_doubles_1_2_3_4.json deleted file mode 100644 index 3794bf58ec..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_doubles_1_2_3_4.json +++ /dev/null @@ -1 +0,0 @@ -[1.0, 2.0, 3.0, 4.0] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/array_empty.json b/src/Valijson/valijson/tests/data/documents/array_empty.json deleted file mode 100644 index 0637a088a0..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_empty.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/array_integers_10_20_30_40.json b/src/Valijson/valijson/tests/data/documents/array_integers_10_20_30_40.json deleted file mode 100644 index 1d83c14c2b..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_integers_10_20_30_40.json +++ /dev/null @@ -1 +0,0 @@ -[10, 20, 30, 40] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/array_integers_1_2_3.json b/src/Valijson/valijson/tests/data/documents/array_integers_1_2_3.json deleted file mode 100644 index 6001c443be..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_integers_1_2_3.json +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/array_integers_1_2_3_4.json b/src/Valijson/valijson/tests/data/documents/array_integers_1_2_3_4.json deleted file mode 100644 index 98d20c4307..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_integers_1_2_3_4.json +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3, 4] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/array_strings_10_20_30_40.json b/src/Valijson/valijson/tests/data/documents/array_strings_10_20_30_40.json deleted file mode 100644 index c4865ff635..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_strings_10_20_30_40.json +++ /dev/null @@ -1 +0,0 @@ -["10", "20", "30", "40"] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/array_strings_1_2_3.json b/src/Valijson/valijson/tests/data/documents/array_strings_1_2_3.json deleted file mode 100644 index 28120b42bf..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_strings_1_2_3.json +++ /dev/null @@ -1 +0,0 @@ -["1", "2", "3"] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/array_strings_1_2_3_4.json b/src/Valijson/valijson/tests/data/documents/array_strings_1_2_3_4.json deleted file mode 100644 index d6009df92f..0000000000 --- a/src/Valijson/valijson/tests/data/documents/array_strings_1_2_3_4.json +++ /dev/null @@ -1 +0,0 @@ -["1", "2", "3", "4"] \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/documents/object_empty.json b/src/Valijson/valijson/tests/data/documents/object_empty.json deleted file mode 100644 index 9e26dfeeb6..0000000000 --- a/src/Valijson/valijson/tests/data/documents/object_empty.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/Valijson/valijson/tests/data/schemas/allof_integers_and_numbers.schema.json b/src/Valijson/valijson/tests/data/schemas/allof_integers_and_numbers.schema.json deleted file mode 100644 index adfaf28815..0000000000 --- a/src/Valijson/valijson/tests/data/schemas/allof_integers_and_numbers.schema.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "comment": "Document must contain an array of integers, all unique.", - "allOf": [ - { - "items": { - "type": "integer" - }, - "additionalItems": false, - "type": "array" - }, - { - "items": { - "type": "number" - }, - "additionalItems": false, - "type": "array", - "uniqueItems": true - } - ] -} \ No newline at end of file diff --git a/src/Valijson/valijson/tests/fuzzing/fuzzer.cpp b/src/Valijson/valijson/tests/fuzzing/fuzzer.cpp deleted file mode 100644 index 7baeddbf57..0000000000 --- a/src/Valijson/valijson/tests/fuzzing/fuzzer.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include - -#include -#include -#include -#include -#include - -using valijson::Schema; -using valijson::SchemaParser; -using valijson::adapters::RapidJsonAdapter; - -extern "C" int -LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - if(size<3) return 0; - char input_file[256]; - sprintf(input_file, "/tmp/libfuzzer.json"); - FILE *fp = fopen(input_file, "wb"); - if (!fp) - return 0; - fwrite(data, size, 1, fp); - fclose(fp); - - rapidjson::Document schemaDocument; - if (!valijson::utils::loadDocument(input_file, schemaDocument)) { - return 1; - } - - Schema schema; - SchemaParser parser; - RapidJsonAdapter schemaDocumentAdapter(schemaDocument); - try { - parser.populateSchema(schemaDocumentAdapter, schema); - } catch (std::exception &e) { - unlink(input_file); - return 1; - } - - unlink(input_file); - return 1; -} diff --git a/src/Valijson/valijson/tests/fuzzing/oss-fuzz-build.sh b/src/Valijson/valijson/tests/fuzzing/oss-fuzz-build.sh deleted file mode 100755 index 346dc7290c..0000000000 --- a/src/Valijson/valijson/tests/fuzzing/oss-fuzz-build.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -eu - -# This line causes an abort which breaks fuzzing: -sed -i '27d' include/valijson/utils/rapidjson_utils.hpp - -mkdir build -cd build -cmake -Dvalijson_BUILD_EXAMPLES=FALSE \ - -Dvalijson_EXCLUDE_BOOST=TRUE \ - .. - -make -j$(nproc) - -cd ../tests/fuzzing - -find ../.. -name "*.o" -exec ar rcs fuzz_lib.a {} \; - -$CXX $CXXFLAGS -DVALIJSON_USE_EXCEPTIONS=1 \ - -I/src/valijson/thirdparty/rapidjson-48fbd8c/include \ - -I/src/valijson/thirdparty/rapidjson-48fbd8c/include/rapidjson \ - -I/src/valijson/include \ - -I/src/valijson/include/valijson \ - -I/src/valijson/include/valijson/adapters \ - -c fuzzer.cpp -o fuzzer.o - -$CXX $CXXFLAGS $LIB_FUZZING_ENGINE \ - -DVALIJSON_USE_EXCEPTIONS=1 \ - -rdynamic fuzzer.o \ - -o $OUT/fuzzer fuzz_lib.a - -zip $OUT/fuzzer_seed_corpus.zip \ - $SRC/valijson/doc/schema/draft-03.json diff --git a/src/Valijson/valijson/tests/test_adapter_comparison.cpp b/src/Valijson/valijson/tests/test_adapter_comparison.cpp deleted file mode 100644 index b531efdbe4..0000000000 --- a/src/Valijson/valijson/tests/test_adapter_comparison.cpp +++ /dev/null @@ -1,614 +0,0 @@ -#ifdef _MSC_VER -#pragma warning(disable: 4706) -#include -#pragma warning(default: 4706) -#else -#include -#endif - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#ifdef VALIJSON_BUILD_BOOST_ADAPTERS -#include -#include -#include -#include -#endif - -#ifdef VALIJSON_BUILD_QT_ADAPTER -#include -#include -#include -#endif - -#ifdef VALIJSON_BUILD_POCO_ADAPTER -#include -#include -#endif - -#define TEST_DATA_DIR "../tests/data/documents/" - -using valijson::adapters::AdapterTraits; - -class TestAdapterComparison : public testing::Test -{ -protected: - - struct JsonFile - { - JsonFile(std::string path, int strictGroup, int looseGroup) - : m_path(std::move(path)), - m_strictGroup(strictGroup), - m_looseGroup(looseGroup) { } - - std::string m_path; - int m_strictGroup; - int m_looseGroup; - }; - - static void SetUpTestCase() - { - const std::string testDataDir(TEST_DATA_DIR); - - // - // Each test is allocated to two groups. The first group is the strict - // comparison group. All test files that have been assigned to the same - // group should be equal, when compared using strict types. The second - // group is the loose comparison group. All tests files in a loose - // group should be equal, when compared without using strict types. - // - // As an example, the first three test files are in the same loose - // group. This means they are expected to be equal when compared without - // strict types. However, only the first two files in the same strict - // group, which means that only they should be equal. - // - jsonFiles.emplace_back(testDataDir + "array_doubles_1_2_3.json", 1, 1); - jsonFiles.emplace_back(testDataDir + "array_integers_1_2_3.json", 1, 1); - jsonFiles.emplace_back(testDataDir + "array_strings_1_2_3.json", 2, 1); - - jsonFiles.emplace_back(testDataDir + "array_doubles_1_2_3_4.json", 3, 2); - jsonFiles.emplace_back(testDataDir + "array_integers_1_2_3_4.json", 3, 2); - jsonFiles.emplace_back(testDataDir + "array_strings_1_2_3_4.json", 4, 2); - - jsonFiles.emplace_back(testDataDir + "array_doubles_10_20_30_40.json", 5, 3); - jsonFiles.emplace_back(testDataDir + "array_integers_10_20_30_40.json", 5, 3); - jsonFiles.emplace_back(testDataDir + "array_strings_10_20_30_40.json", 6, 3); - } - - template - static void testComparison() - { - std::vector::const_iterator outerItr, innerItr; - - for(outerItr = jsonFiles.begin(); outerItr != jsonFiles.end() - 1; ++outerItr) { - for(innerItr = outerItr; innerItr != jsonFiles.end(); ++innerItr) { - - const bool expectedStrict = (outerItr->m_strictGroup == innerItr->m_strictGroup); - const bool expectedLoose = (outerItr->m_looseGroup == innerItr->m_looseGroup); - - typename AdapterTraits::DocumentType document1; - ASSERT_TRUE( valijson::utils::loadDocument(outerItr->m_path, document1) ); - const Adapter1 adapter1(document1); - const std::string adapter1Name = AdapterTraits::adapterName(); - - typename AdapterTraits::DocumentType document2; - ASSERT_TRUE( valijson::utils::loadDocument(innerItr->m_path, document2) ); - const Adapter2 adapter2(document2); - const std::string adapter2Name = AdapterTraits::adapterName(); - - // If either adapter does not support strict types, then strict - // comparison should not be used, UNLESS the adapters are of the - // same type. If they are of the same type, then the internal - // type degradation should be the same, therefore strict testing - // of equality makes sense. - if (adapter1.hasStrictTypes() && adapter2.hasStrictTypes() && adapter1Name == adapter2Name) { - EXPECT_EQ(expectedStrict, adapter1.equalTo(adapter2, true)) - << "Comparing '" << outerItr->m_path << "' to '" - << innerItr->m_path << "' " - << "with strict comparison enabled"; - EXPECT_EQ(expectedStrict, adapter2.equalTo(adapter1, true)) - << "Comparing '" << innerItr->m_path << "' to '" - << outerItr->m_path << "' " - << "with strict comparison enabled"; - } - - EXPECT_EQ(expectedLoose, adapter1.equalTo(adapter2, false)) - << "Comparing '" << outerItr->m_path << "' to '" - << innerItr->m_path << "' " - << "with strict comparison disabled"; - EXPECT_EQ(expectedLoose, adapter2.equalTo(adapter1, false)) - << "Comparing '" << innerItr->m_path << "' to '" - << outerItr->m_path << "' " - << "with strict comparison disabled"; - } - } - } - - static std::vector jsonFiles; -}; - -std::vector TestAdapterComparison::jsonFiles; - -// -// JsonCppAdapter vs X -// ------------------------------------------------------------------------------------------------ - -TEST_F(TestAdapterComparison, JsonCppVsJsonCpp) -{ - testComparison< - valijson::adapters::JsonCppAdapter, - valijson::adapters::JsonCppAdapter>(); -} - -TEST_F(TestAdapterComparison, JsonCppVsPicoJson) -{ - testComparison< - valijson::adapters::JsonCppAdapter, - valijson::adapters::PicoJsonAdapter>(); -} - -#ifdef VALIJSON_BUILD_BOOST_ADAPTERS - -TEST_F(TestAdapterComparison, JsonCppVsPropertyTree) -{ - testComparison< - valijson::adapters::JsonCppAdapter, - valijson::adapters::PropertyTreeAdapter>(); -} - -TEST_F(TestAdapterComparison, JsonCppVsBoostJson) -{ - testComparison< - valijson::adapters::JsonCppAdapter, - valijson::adapters::BoostJsonAdapter>(); -} - -#endif - -TEST_F(TestAdapterComparison, JsonCppVsRapidJson) -{ - testComparison< - valijson::adapters::JsonCppAdapter, - valijson::adapters::RapidJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, JsonCppVsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::JsonCppAdapter, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - - -#ifdef VALIJSON_BUILD_BOOST_ADAPTERS -// -// PropertyTreeAdapter vs X -// ------------------------------------------------------------------------------------------------ - -TEST_F(TestAdapterComparison, PropertyTreeVsPicoJson) -{ - testComparison< - valijson::adapters::PropertyTreeAdapter, - valijson::adapters::PicoJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, PropertyTreeVsPropertyTree) -{ - testComparison< - valijson::adapters::PropertyTreeAdapter, - valijson::adapters::PropertyTreeAdapter>(); -} - -TEST_F(TestAdapterComparison, PropertyTreeVsRapidJson) -{ - testComparison< - valijson::adapters::PropertyTreeAdapter, - valijson::adapters::RapidJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, PropertyTreeVsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::PropertyTreeAdapter, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - -// -// BoostJsonAdapter vs X -// ------------------------------------------------------------------------------------------------ - -TEST_F(TestAdapterComparison, BoostJsonVsPicoJson) -{ - testComparison< - valijson::adapters::BoostJsonAdapter, - valijson::adapters::PicoJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, BoostJsonVsBoostJson) -{ - testComparison< - valijson::adapters::BoostJsonAdapter, - valijson::adapters::BoostJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, BoostJsonVsRapidJson) -{ - testComparison< - valijson::adapters::BoostJsonAdapter, - valijson::adapters::RapidJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, BoostJsonVsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::BoostJsonAdapter, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - -#endif - -// -// RapidJson vs X -// ------------------------------------------------------------------------------------------------ - -TEST_F(TestAdapterComparison, RapidJsonVsRapidJson) -{ - testComparison< - valijson::adapters::RapidJsonAdapter, - valijson::adapters::RapidJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, RapidJsonVsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::RapidJsonAdapter, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - -TEST_F(TestAdapterComparison, RapidJsonVsPicoJson) -{ - testComparison< - valijson::adapters::RapidJsonAdapter, - valijson::adapters::PicoJsonAdapter>(); -} - -// -// PicoJsonAdapter vs X -// ------------------------------------------------------------------------------------------------ - -TEST_F(TestAdapterComparison, PicoJsonVsPicoJson) -{ - testComparison< - valijson::adapters::PicoJsonAdapter, - valijson::adapters::PicoJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, PicoJsonVsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::PicoJsonAdapter, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - -TEST_F(TestAdapterComparison, RapidJsonCrtAllocVsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> >, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - -// -// Json11Adapter vs X -// ------------------------------------------------------------------------------------------------ - -TEST_F(TestAdapterComparison, Json11VsJson11) -{ - testComparison< - valijson::adapters::Json11Adapter, - valijson::adapters::Json11Adapter>(); -} - -TEST_F(TestAdapterComparison, Json11VsJsonCpp) -{ - testComparison< - valijson::adapters::Json11Adapter, - valijson::adapters::JsonCppAdapter>(); -} - - -TEST_F(TestAdapterComparison, Json11VsRapidJson) -{ - testComparison< - valijson::adapters::Json11Adapter, - valijson::adapters::RapidJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, Json11VsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::Json11Adapter, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - -TEST_F(TestAdapterComparison, Json11VsPicoJson) -{ - testComparison< - valijson::adapters::Json11Adapter, - valijson::adapters::PicoJsonAdapter>(); -} - -#ifdef VALIJSON_BUILD_BOOST_ADAPTERS - -TEST_F(TestAdapterComparison, Json11VsPropertyTree) -{ - testComparison< - valijson::adapters::Json11Adapter, - valijson::adapters::PropertyTreeAdapter>(); -} - -TEST_F(TestAdapterComparison, Json11VsBoostJson) -{ - testComparison< - valijson::adapters::Json11Adapter, - valijson::adapters::BoostJsonAdapter>(); -} - -#endif // VALIJSON_BUILD_BOOST_ADAPTERS - -// -// NlohmannJsonAdapter vs X -// ------------------------------------------------------------------------------------------------ - -TEST_F(TestAdapterComparison, NlohmannJsonVsNlohmannJson) { - testComparison< - valijson::adapters::NlohmannJsonAdapter, - valijson::adapters::NlohmannJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, NlohmannJsonVsJson11) -{ - testComparison< - valijson::adapters::NlohmannJsonAdapter, - valijson::adapters::Json11Adapter>(); -} - -TEST_F(TestAdapterComparison, NlohmannJsonVsJsonCpp) -{ - testComparison< - valijson::adapters::NlohmannJsonAdapter, - valijson::adapters::JsonCppAdapter>(); -} - - -TEST_F(TestAdapterComparison, NlohmannJsonVsRapidJson) -{ - testComparison< - valijson::adapters::NlohmannJsonAdapter, - valijson::adapters::RapidJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, NlohmannJsonVsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::NlohmannJsonAdapter, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - -TEST_F(TestAdapterComparison, NlohmannJsonVsPicoJson) -{ - testComparison< - valijson::adapters::NlohmannJsonAdapter, - valijson::adapters::PicoJsonAdapter>(); -} - -#ifdef VALIJSON_BUILD_BOOST_ADAPTERS - -TEST_F(TestAdapterComparison, NlohmannJsonVsPropertyTree) -{ - testComparison< - valijson::adapters::NlohmannJsonAdapter, - valijson::adapters::PropertyTreeAdapter>(); -} - -TEST_F(TestAdapterComparison, NlohmannJsonVsBoostJson) -{ - testComparison< - valijson::adapters::NlohmannJsonAdapter, - valijson::adapters::BoostJsonAdapter>(); -} - -#endif // VALIJSON_BUILD_BOOST_ADAPTERS - -// -// QtJsonAdapter vs X -// ------------------------------------------------------------------------------------------------ - -#ifdef VALIJSON_BUILD_QT_ADAPTER - -TEST_F(TestAdapterComparison, QtJsonVsQtJson) { - testComparison< - valijson::adapters::QtJsonAdapter, - valijson::adapters::QtJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, QtJsonVsJsonCpp) -{ - testComparison< - valijson::adapters::QtJsonAdapter, - valijson::adapters::JsonCppAdapter>(); -} - -TEST_F(TestAdapterComparison, QtJsonVsRapidJson) -{ - testComparison< - valijson::adapters::QtJsonAdapter, - valijson::adapters::RapidJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, QtJsonVsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::QtJsonAdapter, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - -TEST_F(TestAdapterComparison, QtJsonVsPicoJson) -{ - testComparison< - valijson::adapters::QtJsonAdapter, - valijson::adapters::PicoJsonAdapter>(); -} - -#ifdef VALIJSON_BUILD_BOOST_ADAPTERS - -TEST_F(TestAdapterComparison, QtJsonVsPropertyTree) -{ - testComparison< - valijson::adapters::QtJsonAdapter, - valijson::adapters::PropertyTreeAdapter>(); -} - -TEST_F(TestAdapterComparison, QtJsonVsBoostJson) -{ - testComparison< - valijson::adapters::QtJsonAdapter, - valijson::adapters::BoostJsonAdapter>(); -} - -#endif // VALIJSON_BUILD_BOOST_ADAPTERS - -TEST_F(TestAdapterComparison, QtJsonVsJson11) -{ - testComparison< - valijson::adapters::QtJsonAdapter, - valijson::adapters::Json11Adapter>(); -} - -TEST_F(TestAdapterComparison, QtJsonVsNlohmannJson) -{ - testComparison< - valijson::adapters::QtJsonAdapter, - valijson::adapters::NlohmannJsonAdapter>(); -} - -#endif // VALIJSON_BUILD_QT_ADAPTER - -// -// PocoJsonAdapter vs X -// ------------------------------------------------------------------------------------------------ - -#ifdef VALIJSON_BUILD_POCO_ADAPTER - -TEST_F(TestAdapterComparison, PocoJsonVsPocoJson) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::PocoJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, PocoJsonVsJsonCpp) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::JsonCppAdapter>(); -} - -TEST_F(TestAdapterComparison, PocoJsonVsRapidJson) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::RapidJsonAdapter>(); -} - -TEST_F(TestAdapterComparison, PocoJsonVsRapidJsonCrtAlloc) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::GenericRapidJsonAdapter< - rapidjson::GenericValue, - rapidjson::CrtAllocator> > >(); -} - -TEST_F(TestAdapterComparison, PocoJsonVsPicoJson) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::PicoJsonAdapter>(); -} - -#ifdef VALIJSON_BUILD_BOOST_ADAPTERS - -TEST_F(TestAdapterComparison, PocoJsonVsPropertyTree) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::PropertyTreeAdapter>(); -} - -TEST_F(TestAdapterComparison, PocoJsonVsBoostJson) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::BoostJsonAdapter>(); -} - -#endif // VALIJSON_BUILD_BOOST_ADAPTERS - -TEST_F(TestAdapterComparison, PocoJsonVsJson11) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::Json11Adapter>(); -} - -TEST_F(TestAdapterComparison, PocoJsonVsNlohmannJsonAdapter) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::NlohmannJsonAdapter>(); -} - -#ifdef VALIJSON_BUILD_QT_ADAPTER - -TEST_F(TestAdapterComparison, PocoJsonVsQtJson) -{ - testComparison< - valijson::adapters::PocoJsonAdapter, - valijson::adapters::QtJsonAdapter>(); -} - -#endif // VALIJSON_BUILD_QT_ADAPTER - -#endif // VALIJSON_BUILD_POCO_ADAPTER diff --git a/src/Valijson/valijson/tests/test_boost_json_adapter.cpp b/src/Valijson/valijson/tests/test_boost_json_adapter.cpp deleted file mode 100644 index bd88060d4b..0000000000 --- a/src/Valijson/valijson/tests/test_boost_json_adapter.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include - -#include // Needs to be included exactly once in the code to use header-only version of Boost.JSON - -#include - -class TestBoostJsonAdapter : public testing::Test -{ - -}; - -TEST_F(TestBoostJsonAdapter, BasicArrayIteration) -{ - const unsigned int numElements = 10; - - // Create a Json document that consists of an array of numbers - boost::json::array array; - for (unsigned int i = 0; i < numElements; i++) { - // Boost.JSON differs from some other libraries in offering emplace_back() - // as well as push_back(). Using the former here saves us having to create - // a temporary. - array.emplace_back(static_cast(i)); - } - boost::json::value document(array); - - // Ensure that wrapping the document preserves the array and does not allow - // it to be cast to other types - valijson::adapters::BoostJsonAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the array contains the expected number of elements - EXPECT_EQ( numElements, adapter.getArray().size() ); - - // Ensure that the elements are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::BoostJsonAdapter value : adapter.getArray()) { - ASSERT_TRUE( value.isNumber() ); - EXPECT_EQ( double(expectedValue), value.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ(numElements, expectedValue); -} - -TEST_F(TestBoostJsonAdapter, BasicObjectIteration) -{ - const unsigned int numElements = 10; - - // Create a DropBoxJson document that consists of an object that maps numeric - // strings their corresponding numeric values - boost::json::object object; - for (uint32_t i = 0; i < numElements; i++) { - object[std::to_string(i)] = static_cast(i); - } - boost::json::value document(object); - - // Ensure that wrapping the document preserves the object and does not - // allow it to be cast to other types - valijson::adapters::BoostJsonAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the object contains the expected number of members - EXPECT_EQ( numElements, adapter.getObject().size() ); - - // Ensure that the members are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::BoostJsonAdapter::ObjectMember member : adapter.getObject()) { - ASSERT_TRUE( member.second.isNumber() ); - EXPECT_EQ( std::to_string(expectedValue), member.first ); - EXPECT_EQ( double(expectedValue), member.second.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ( numElements, expectedValue ); -} diff --git a/src/Valijson/valijson/tests/test_fetch_absolute_uri_document_callback.cpp b/src/Valijson/valijson/tests/test_fetch_absolute_uri_document_callback.cpp deleted file mode 100644 index c1e703cd7a..0000000000 --- a/src/Valijson/valijson/tests/test_fetch_absolute_uri_document_callback.cpp +++ /dev/null @@ -1,80 +0,0 @@ - -#include - -#include - -#include -#include -#include - -using valijson::Schema; -using valijson::SchemaParser; -using valijson::adapters::RapidJsonAdapter; -using valijson::Validator; - -class TestFetchAbsoluteUriDocumentCallback : public ::testing::Test -{ - -}; - -const rapidjson::Document * fetchAbsoluteUriDocument(const std::string &uri) -{ - EXPECT_STREQ("http://localhost:1234/", uri.c_str()); - - rapidjson::Document *fetchedRoot = new rapidjson::Document(); - fetchedRoot->SetObject(); - - rapidjson::Value valueOfTypeAttribute; - valueOfTypeAttribute.SetString("string", fetchedRoot->GetAllocator()); - - rapidjson::Value schemaOfTestProperty; - schemaOfTestProperty.SetObject(); - schemaOfTestProperty.AddMember("type", valueOfTypeAttribute, - fetchedRoot->GetAllocator()); - - rapidjson::Value propertiesConstraint; - propertiesConstraint.SetObject(); - propertiesConstraint.AddMember("test", schemaOfTestProperty, - fetchedRoot->GetAllocator()); - - fetchedRoot->AddMember("properties", propertiesConstraint, - fetchedRoot->GetAllocator()); - - return fetchedRoot; -} - -void freeAbsoluteUriDocument(const rapidjson::Document *adapter) -{ - delete adapter; -} - -TEST_F(TestFetchAbsoluteUriDocumentCallback, Basics) -{ - // Define schema - rapidjson::Document schemaDocument; - RapidJsonAdapter schemaDocumentAdapter(schemaDocument); - schemaDocument.SetObject(); - schemaDocument.AddMember("$ref", "http://localhost:1234/#/", - schemaDocument.GetAllocator()); - - // Parse schema document - Schema schema; - SchemaParser schemaParser; - schemaParser.populateSchema(schemaDocumentAdapter, schema, fetchAbsoluteUriDocument, - freeAbsoluteUriDocument); - - // Test resulting schema with a valid document - rapidjson::Document validDocument; - validDocument.SetObject(); - validDocument.AddMember("test", "valid", schemaDocument.GetAllocator()); - Validator validator; - EXPECT_TRUE(validator.validate(schema, RapidJsonAdapter(validDocument), - NULL)); - - // Test resulting schema with an invalid document - rapidjson::Document invalidDocument; - invalidDocument.SetObject(); - invalidDocument.AddMember("test", 123, schemaDocument.GetAllocator()); - EXPECT_FALSE(validator.validate(schema, RapidJsonAdapter(invalidDocument), - NULL)); -} diff --git a/src/Valijson/valijson/tests/test_fetch_urn_document_callback.cpp b/src/Valijson/valijson/tests/test_fetch_urn_document_callback.cpp deleted file mode 100644 index 0121a9de63..0000000000 --- a/src/Valijson/valijson/tests/test_fetch_urn_document_callback.cpp +++ /dev/null @@ -1,80 +0,0 @@ - -#include - -#include - -#include -#include -#include - -using valijson::Schema; -using valijson::SchemaParser; -using valijson::adapters::RapidJsonAdapter; -using valijson::Validator; - -class TestFetchUrnDocumentCallback : public ::testing::Test -{ - -}; - -const rapidjson::Document * fetchUrnDocument(const std::string &uri) -{ - EXPECT_STREQ("urn:mvn:example.schema.common:status:1.1.0", uri.c_str()); - - rapidjson::Document *fetchedRoot = new rapidjson::Document(); - fetchedRoot->SetObject(); - - rapidjson::Value valueOfTypeAttribute; - valueOfTypeAttribute.SetString("string", fetchedRoot->GetAllocator()); - - rapidjson::Value schemaOfTestProperty; - schemaOfTestProperty.SetObject(); - schemaOfTestProperty.AddMember("type", valueOfTypeAttribute, - fetchedRoot->GetAllocator()); - - rapidjson::Value propertiesConstraint; - propertiesConstraint.SetObject(); - propertiesConstraint.AddMember("test", schemaOfTestProperty, - fetchedRoot->GetAllocator()); - - fetchedRoot->AddMember("properties", propertiesConstraint, - fetchedRoot->GetAllocator()); - - return fetchedRoot; -} - -void freeUrnDocument(const rapidjson::Document *adapter) -{ - delete adapter; -} - -TEST_F(TestFetchUrnDocumentCallback, Basics) -{ - // Define schema - rapidjson::Document schemaDocument; - RapidJsonAdapter schemaDocumentAdapter(schemaDocument); - schemaDocument.SetObject(); - schemaDocument.AddMember("$ref", "urn:mvn:example.schema.common:status:1.1.0", - schemaDocument.GetAllocator()); - - // Parse schema document - Schema schema; - SchemaParser schemaParser; - schemaParser.populateSchema(schemaDocumentAdapter, schema, fetchUrnDocument, - freeUrnDocument); - - // Test resulting schema with a valid document - rapidjson::Document validDocument; - validDocument.SetObject(); - validDocument.AddMember("test", "valid", schemaDocument.GetAllocator()); - Validator validator; - EXPECT_TRUE(validator.validate(schema, RapidJsonAdapter(validDocument), - NULL)); - - // Test resulting schema with an invalid document - rapidjson::Document invalidDocument; - invalidDocument.SetObject(); - invalidDocument.AddMember("test", 123, schemaDocument.GetAllocator()); - EXPECT_FALSE(validator.validate(schema, RapidJsonAdapter(invalidDocument), - NULL)); -} diff --git a/src/Valijson/valijson/tests/test_json11_adapter.cpp b/src/Valijson/valijson/tests/test_json11_adapter.cpp deleted file mode 100644 index 989843f361..0000000000 --- a/src/Valijson/valijson/tests/test_json11_adapter.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include - -#include - -class TestJson11Adapter : public testing::Test -{ - -}; - -TEST_F(TestJson11Adapter, BasicArrayIteration) -{ - const unsigned int numElements = 10; - - // Create a Json11 document that consists of an array of numbers - json11::Json::array array; - for (unsigned int i = 0; i < numElements; i++) { - json11::Json value(static_cast(i)); - array.push_back(value); - } - json11::Json document(array); - - // Ensure that wrapping the document preserves the array and does not allow - // it to be cast to other types - valijson::adapters::Json11Adapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - // Ensure that the array contains the expected number of elements - EXPECT_EQ( numElements, adapter.getArray().size() ); - - // Ensure that the elements are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::Json11Adapter value : adapter.getArray()) { - ASSERT_TRUE( value.isNumber() ); - EXPECT_EQ( double(expectedValue), value.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ(numElements, expectedValue); -} - -TEST_F(TestJson11Adapter, BasicObjectIteration) -{ - const unsigned int numElements = 10; - - // Create a DropBoxJson11 document that consists of an object that maps numeric - // strings their corresponding numeric values - json11::Json::object object; - for (unsigned int i = 0; i < numElements; i++) { - std::string name(std::to_string(i)); - object[name] = json11::Json(static_cast(i)); - } - json11::Json document(object); - - // Ensure that wrapping the document preserves the object and does not - // allow it to be cast to other types - valijson::adapters::Json11Adapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - // Ensure that the object contains the expected number of members - EXPECT_EQ( numElements, adapter.getObject().size() ); - - // Ensure that the members are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::Json11Adapter::ObjectMember member : adapter.getObject()) { - ASSERT_TRUE( member.second.isNumber() ); - EXPECT_EQ( std::to_string(expectedValue), member.first ); - EXPECT_EQ( double(expectedValue), member.second.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ( numElements, expectedValue ); -} diff --git a/src/Valijson/valijson/tests/test_json_pointer.cpp b/src/Valijson/valijson/tests/test_json_pointer.cpp deleted file mode 100644 index 480af9e998..0000000000 --- a/src/Valijson/valijson/tests/test_json_pointer.cpp +++ /dev/null @@ -1,309 +0,0 @@ -#include - -#include - -#include - -#include - -using valijson::adapters::RapidJsonAdapter; -using valijson::internal::json_pointer::resolveJsonPointer; - -typedef rapidjson::MemoryPoolAllocator RapidJsonCrtAllocator; - -class TestJsonPointer : public testing::Test -{ - -}; - -struct JsonPointerTestCase -{ - /// Description of test case - std::string description; - - /// Document to traverse when resolving the JSON Pointer - rapidjson::Value value; - - /// JSON Pointer that should guide traversal of the document - std::string jsonPointer; - - /// Optional reference to the expected result from the original document - rapidjson::Value *expectedValue; -}; - -std::vector > - testCasesForSingleLevelObjectPointers( - RapidJsonCrtAllocator &allocator) -{ - typedef std::shared_ptr TestCase; - - std::vector testCases; - - TestCase testCase = std::make_shared(); - testCase->description = "Resolving '#' should cause an exception to be thrown"; - testCase->value.SetNull(); - testCase->jsonPointer = "#"; - testCase->expectedValue = nullptr; - testCases.push_back(testCase); - - testCase = std::make_shared(); - testCase->description = "Resolving an empty string should return the root node"; - testCase->value.SetNull(); - testCase->jsonPointer = ""; - testCase->expectedValue = &testCase->value; - testCases.push_back(testCase); - - testCase = std::make_shared(); - testCase->description = "Resolving '/' should return the root node"; - testCase->value.SetNull(); - testCase->jsonPointer = "/"; - testCase->expectedValue = &testCase->value; - testCases.push_back(testCase); - - testCase = std::make_shared(); - testCase->description = "Resolving '//' should return the root node"; - testCase->value.SetNull(); - testCase->jsonPointer = "//"; - testCase->expectedValue = &testCase->value; - testCases.push_back(testCase); - - testCase = std::make_shared(); - testCase->description = "Resolve '/test' in object containing one member named 'test'"; - testCase->value.SetObject(); - testCase->value.AddMember("test", "test", allocator); - testCase->jsonPointer = "/test"; - testCase->expectedValue = &testCase->value.FindMember("test")->value; - testCases.push_back(testCase); - - testCase = std::make_shared(); - testCase->description = "Resolve '/test/' in object containing one member named 'test'"; - testCase->value.SetObject(); - testCase->value.AddMember("test", "test", allocator); - testCase->jsonPointer = "/test/"; - testCase->expectedValue = &testCase->value.FindMember("test")->value; - testCases.push_back(testCase); - - testCase = std::make_shared(); - testCase->description = "Resolve '//test//' in object containing one member named 'test'"; - testCase->value.SetObject(); - testCase->value.AddMember("test", "test", allocator); - testCase->jsonPointer = "//test//"; - testCase->expectedValue = &testCase->value.FindMember("test")->value; - testCases.push_back(testCase); - - testCase = std::make_shared(); - testCase->description = "Resolve '/missing' in object containing one member name 'test'"; - testCase->value.SetObject(); - testCase->value.AddMember("test", "test", allocator); - testCase->jsonPointer = "/missing"; - testCase->expectedValue = nullptr; - testCases.push_back(testCase); - - { - rapidjson::Value nonemptyString; - nonemptyString.SetString("hello, world"); - - testCase = std::make_shared(); - testCase->description = "Resolve '/value/foo' fails because 'value' is not an object (but a non empty string)"; - testCase->value.SetObject(); - testCase->value.AddMember("value", nonemptyString, allocator); - testCase->jsonPointer = "/value/bar"; - testCase->expectedValue = &testCase->value; - testCase->expectedValue = nullptr; - testCases.push_back(testCase); - } - - { - rapidjson::Value emptyString; - emptyString.SetString(""); - - testCase = std::make_shared(); - testCase->description = "Resolve '/empty/after_empty' fails because 'empty' is an empty string"; - testCase->value.SetObject(); - testCase->value.AddMember("empty", emptyString, allocator); - testCase->jsonPointer = "/empty/after_empty"; - testCase->expectedValue = nullptr; - testCases.push_back(testCase); - } - - { - rapidjson::Value testArray; - testArray.SetArray(); - testArray.PushBack("test0", allocator); - testArray.PushBack("test1", allocator); - testArray.PushBack("test2", allocator); - - testCase = std::make_shared(); - testCase->description = "Resolve '/test/0' in object containing one member containing an array with 3 elements"; - testCase->value.SetObject(); - testCase->value.AddMember("test", testArray, allocator); - testCase->jsonPointer = "/test/0"; - testCase->expectedValue = &testCase->value.FindMember("test")->value[rapidjson::SizeType(0)]; - testCases.push_back(testCase); - } - - { - rapidjson::Value testArray; - testArray.SetArray(); - testArray.PushBack("test0", allocator); - testArray.PushBack("test1", allocator); - testArray.PushBack("test2", allocator); - - testCase = std::make_shared(); - testCase->description = "Resolve '/test/1' in object containing one member containing an array with 3 elements"; - testCase->value.SetObject(); - testCase->value.AddMember("test", testArray, allocator); - testCase->jsonPointer = "/test/1"; - testCase->expectedValue = &testCase->value.FindMember("test")->value[rapidjson::SizeType(1)]; - testCases.push_back(testCase); - } - - { - rapidjson::Value testArray; - testArray.SetArray(); - testArray.PushBack("test0", allocator); - testArray.PushBack("test1", allocator); - testArray.PushBack("test2", allocator); - - testCase = std::make_shared(); - testCase->description = "Resolve '/test/2' in object containing one member containing an array with 3 elements"; - testCase->value.SetObject(); - testCase->value.AddMember("test", testArray, allocator); - testCase->jsonPointer = "/test/2"; - testCase->expectedValue = &testCase->value.FindMember("test")->value[rapidjson::SizeType(2)]; - testCases.push_back(testCase); - } - - { - rapidjson::Value testArray; - testArray.SetArray(); - testArray.PushBack("test0", allocator); - testArray.PushBack("test1", allocator); - testArray.PushBack("test2", allocator); - - testCase = std::make_shared(); - testCase->description = "Resolving '/test/3' in object containing one member containing " - "an array with 3 elements should throw an exception"; - testCase->value.SetObject(); - testCase->value.AddMember("test", testArray, allocator); - testCase->jsonPointer = "/test/3"; - testCase->expectedValue = nullptr; - testCases.push_back(testCase); - } - - // - // Allow the "-" character is not useful within the context of this library, - // there is an explicit check for it, so that a custom error message can - // be included in the exception that is thrown. - // - // From the JSON Pointer specification (RFC 6901, April 2013): - // - // Note that the use of the "-" character to index an array will always - // result in such an error condition because by definition it refers to - // a nonexistent array element. Thus, applications of JSON Pointer need - // to specify how that character is to be handled, if it is to be - // useful. - // - - { - rapidjson::Value testArray; - testArray.SetArray(); - testArray.PushBack("test0", allocator); - testArray.PushBack("test1", allocator); - testArray.PushBack("test2", allocator); - - testCase = std::make_shared(); - testCase->description = "Resolving '/test/-' in object containing one member containing " - "an array with 3 elements should throw an exception"; - testCase->value.SetNull(); - testCase->jsonPointer = "/test/-"; - testCase->expectedValue = nullptr; - testCases.push_back(testCase); - } - - // - // The following tests ensure that escape sequences are handled correctly. - // - // From the JSON Pointer specification (RFC 6901, April 2013): - // - // Evaluation of each reference token begins by decoding any escaped - // character sequence. This is performed by first transforming any - // occurrence of the sequence '~1' to '/', and then transforming any - // occurrence of the sequence '~0' to '~'. By performing the - // substitutions in this order, an implementation avoids the error of - // turning '~01' first into '~1' and then into '/', which would be - // incorrect (the string '~01' correctly becomes '~1' after - // transformation). - // - - { - rapidjson::Value value; - value.SetDouble(10.); - - testCase = std::make_shared(); - testCase->description = "Resolving '/hello~1world' in object containing one member named " - "'hello/world' should return the associated value"; - testCase->value.SetObject(); - testCase->value.AddMember("hello/world", value, allocator); - testCase->jsonPointer = "/hello~1world"; - testCase->expectedValue = &testCase->value.FindMember("hello/world")->value; - testCases.push_back(testCase); - } - - { - rapidjson::Value value; - value.SetDouble(10.); - - testCase = std::make_shared(); - testCase->description = "Resolving '/hello~0world' in object containing one member named " - "'hello~world' should return the associated value"; - testCase->value.SetObject(); - testCase->value.AddMember("hello~world", value, allocator); - testCase->jsonPointer = "/hello~0world"; - testCase->expectedValue = &testCase->value.FindMember("hello~world")->value; - testCases.push_back(testCase); - } - - { - rapidjson::Value value; - value.SetDouble(10.); - - testCase = std::make_shared(); - testCase->description = "Resolving '/hello~01world' in object containing one member named " - "'hello~1world' should return the associated value"; - testCase->value.SetObject(); - testCase->value.AddMember("hello~1world", value, allocator); - testCase->jsonPointer = "/hello~01world"; - testCase->expectedValue = &testCase->value.FindMember("hello~1world")->value; - testCases.push_back(testCase); - } - - return testCases; -} - -TEST_F(TestJsonPointer, JsonPointerTestCases) -{ - typedef std::vector > TestCases; - - // Ensure memory used for test cases is freed when test function completes - rapidjson::MemoryPoolAllocator allocator; - - TestCases testCases = testCasesForSingleLevelObjectPointers(allocator); - - for (const auto & testCase : testCases) { - const std::string &jsonPointer = testCase->jsonPointer; - const RapidJsonAdapter valueAdapter(testCase->value); - if (testCase->expectedValue) { - const RapidJsonAdapter expectedAdapter(*(testCase->expectedValue)); - const RapidJsonAdapter actualAdapter = resolveJsonPointer(valueAdapter, jsonPointer); - EXPECT_TRUE(actualAdapter.equalTo(expectedAdapter, true)) << testCase->description; - } else { - // Since the tests with throwing disabled will abort, we can't - // do anything here. - -#if VALIJSON_USE_EXCEPTIONS - EXPECT_THROW(resolveJsonPointer(valueAdapter, jsonPointer), std::runtime_error) << testCase->description; -#endif - } - } -} diff --git a/src/Valijson/valijson/tests/test_jsoncpp_adapter.cpp b/src/Valijson/valijson/tests/test_jsoncpp_adapter.cpp deleted file mode 100644 index 8abb158acd..0000000000 --- a/src/Valijson/valijson/tests/test_jsoncpp_adapter.cpp +++ /dev/null @@ -1,83 +0,0 @@ - -#include - -#include - -class TestJsonCppAdapter : public testing::Test -{ - -}; - -TEST_F(TestJsonCppAdapter, BasicArrayIteration) -{ - const unsigned int numElements = 10; - - // Create a jsoncpp document that consists of an array of numbers - Json::Value document(Json::arrayValue); - for (unsigned int i = 0; i < numElements; i++) { - document.append(Json::Value(i)); - } - - // Ensure that wrapping the document preserves the array and does not allow - // it to be cast to other types - valijson::adapters::JsonCppAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - // Ensure that the array contains the expected number of elements - EXPECT_EQ( numElements, adapter.getArray().size() ); - - // Ensure that the elements are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::JsonCppAdapter value : adapter.getArray()) { - ASSERT_TRUE( value.isNumber() ); - EXPECT_EQ( double(expectedValue), value.getNumber() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ(numElements, expectedValue); -} - -TEST_F(TestJsonCppAdapter, BasicObjectIteration) -{ - const unsigned int numElements = 10; - - // Create a jsoncpp document that consists of an object that maps numeric - // strings their corresponding numeric values - Json::Value document(Json::objectValue); - for (unsigned int i = 0; i < numElements; i++) { - std::string name(std::to_string(i)); - document[name] = Json::Value(double(i)); - } - - // Ensure that wrapping the document preserves the object and does not - // allow it to be cast to other types - valijson::adapters::JsonCppAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the object contains the expected number of members - EXPECT_EQ( numElements, adapter.getObject().size() ); - - // Ensure that the members are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::JsonCppAdapter::ObjectMember member : adapter.getObject()) { - ASSERT_TRUE( member.second.isNumber() ); - EXPECT_EQ( std::to_string(expectedValue), member.first ); - EXPECT_EQ( double(expectedValue), member.second.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ( numElements, expectedValue ); -} diff --git a/src/Valijson/valijson/tests/test_nlohmann_json_adapter.cpp b/src/Valijson/valijson/tests/test_nlohmann_json_adapter.cpp deleted file mode 100644 index e5543756b2..0000000000 --- a/src/Valijson/valijson/tests/test_nlohmann_json_adapter.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include - -#include - -class TestNlohmannJsonAdapter : public testing::Test -{ - -}; - -TEST_F(TestNlohmannJsonAdapter, BasicArrayIteration) -{ - const unsigned int numElements = 10; - - // Create a Json document that consists of an array of numbers - nlohmann::json document; - - for (unsigned int i = 0; i < numElements; i++) { - document.push_back(static_cast(i)); - } - - // Ensure that wrapping the document preserves the array and does not allow - // it to be cast to other types - valijson::adapters::NlohmannJsonAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the array contains the expected number of elements - EXPECT_EQ( numElements, adapter.getArray().size() ); - - // Ensure that the elements are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::NlohmannJsonAdapter value : adapter.getArray()) { - ASSERT_TRUE( value.isNumber() ); - EXPECT_EQ( double(expectedValue), value.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ(numElements, expectedValue); -} - -TEST_F(TestNlohmannJsonAdapter, BasicObjectIteration) -{ - const unsigned int numElements = 10; - - // Create a DropBoxJson document that consists of an object that maps numeric - // strings their corresponding numeric values - nlohmann::json document; - for (uint32_t i = 0; i < numElements; i++) { - document[std::to_string(i)] = static_cast(i); - } - - // Ensure that wrapping the document preserves the object and does not - // allow it to be cast to other types - valijson::adapters::NlohmannJsonAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the object contains the expected number of members - EXPECT_EQ( numElements, adapter.getObject().size() ); - - // Ensure that the members are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::NlohmannJsonAdapter::ObjectMember member : adapter.getObject()) { - ASSERT_TRUE( member.second.isNumber() ); - EXPECT_EQ( std::to_string(expectedValue), member.first ); - EXPECT_EQ( double(expectedValue), member.second.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ( numElements, expectedValue ); -} diff --git a/src/Valijson/valijson/tests/test_picojson_adapter.cpp b/src/Valijson/valijson/tests/test_picojson_adapter.cpp deleted file mode 100644 index e77fac6969..0000000000 --- a/src/Valijson/valijson/tests/test_picojson_adapter.cpp +++ /dev/null @@ -1,88 +0,0 @@ -#include - -#include - -#include - -class TestPicoJsonAdapter : public testing::Test -{ - -}; - -TEST_F(TestPicoJsonAdapter, BasicArrayIteration) -{ - const unsigned int numElements = 10; - - // Create a picojson document that consists of an array of numbers - picojson::array array; - for (unsigned int i = 0; i < numElements; i++) { - picojson::value value(static_cast(i)); - array.push_back(value); - } - picojson::value document(array); - - // Ensure that wrapping the document preserves the array and does not allow - // it to be cast to other types - valijson::adapters::PicoJsonAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the array contains the expected number of elements - EXPECT_EQ( numElements, adapter.getArray().size() ); - - // Ensure that the elements are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::PicoJsonAdapter value : adapter.getArray()) { - ASSERT_TRUE( value.isNumber() ); - EXPECT_EQ( double(expectedValue), value.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ(numElements, expectedValue); -} - -TEST_F(TestPicoJsonAdapter, BasicObjectIteration) -{ - const unsigned int numElements = 10; - - // Create a picojson document that consists of an object that maps numeric - // strings their corresponding numeric values - picojson::object object; - for (unsigned int i = 0; i < numElements; i++) { - std::string name(std::to_string(i)); - object[name] = picojson::value(static_cast(i)); - } - picojson::value document(object); - - // Ensure that wrapping the document preserves the object and does not - // allow it to be cast to other types - valijson::adapters::PicoJsonAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the object contains the expected number of members - EXPECT_EQ( numElements, adapter.getObject().size() ); - - // Ensure that the members are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::PicoJsonAdapter::ObjectMember member : adapter.getObject()) { - ASSERT_TRUE( member.second.isNumber() ); - EXPECT_EQ( std::to_string(expectedValue), member.first ); - EXPECT_EQ( double(expectedValue), member.second.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ( numElements, expectedValue ); -} diff --git a/src/Valijson/valijson/tests/test_poco_json_adapter.cpp b/src/Valijson/valijson/tests/test_poco_json_adapter.cpp deleted file mode 100644 index 11249a6dea..0000000000 --- a/src/Valijson/valijson/tests/test_poco_json_adapter.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include - -#include - -class TestPocoJsonAdapter : public testing::Test -{ - -}; - -TEST_F(TestPocoJsonAdapter, BasicArrayIteration) -{ - const unsigned int numElements = 10; - - // Create a Json document that consists of an array of numbers - Poco::JSON::Array::Ptr documentImpl = new Poco::JSON::Array(); - - for (unsigned int i = 0; i < numElements; i++) { - documentImpl->set(i, static_cast(i)); - } - - Poco::Dynamic::Var document = documentImpl; - - // Ensure that wrapping the document preserves the array and does not allow - // it to be cast to other types - valijson::adapters::PocoJsonAdapter adapter(document); - ASSERT_NO_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getString() ); - - // Ensure that the array contains the expected number of elements - EXPECT_EQ( numElements, adapter.getArray().size() ); - - // Ensure that the elements are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::PocoJsonAdapter value : adapter.getArray()) { - ASSERT_TRUE( value.isNumber() ); - EXPECT_EQ( double(expectedValue), value.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ(numElements, expectedValue); -} - -TEST_F(TestPocoJsonAdapter, BasicObjectIteration) -{ - const unsigned int numElements = 10; - - // Create a DropBoxJson document that consists of an object that maps numeric - // strings their corresponding numeric values - Poco::JSON::Object::Ptr documentImpl = new Poco::JSON::Object; - - for (uint32_t i = 0; i < numElements; i++) { - documentImpl->set(std::to_string(i), static_cast(i)); - } - - Poco::Dynamic::Var document = documentImpl; - - // Ensure that wrapping the document preserves the object and does not - // allow it to be cast to other types - valijson::adapters::PocoJsonAdapter adapter(document); - ASSERT_NO_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getString() ); - - // Ensure that the object contains the expected number of members - EXPECT_EQ( numElements, adapter.getObject().size() ); - - // Ensure that the members are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::PocoJsonAdapter::ObjectMember member : adapter.getObject()) { - ASSERT_TRUE( member.second.isNumber() ); - EXPECT_EQ( std::to_string(expectedValue), member.first ); - EXPECT_EQ( double(expectedValue), member.second.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ( numElements, expectedValue ); -} diff --git a/src/Valijson/valijson/tests/test_poly_constraint.cpp b/src/Valijson/valijson/tests/test_poly_constraint.cpp deleted file mode 100644 index 639fa5929a..0000000000 --- a/src/Valijson/valijson/tests/test_poly_constraint.cpp +++ /dev/null @@ -1,97 +0,0 @@ -#include - -#include - -#include -#include -#include -#include - -namespace { - -using valijson::adapters::Adapter; -using valijson::Schema; -using valijson::Validator; -using valijson::ValidationResults; -using valijson::adapters::RapidJsonAdapter; - -class StubPolyConstraint : public valijson::constraints::PolyConstraint -{ - bool m_shouldValidate; - -public: - explicit StubPolyConstraint(bool shouldValidate) - : m_shouldValidate(shouldValidate) { } - - Constraint * cloneInto(void *ptr) const override - { - return new (ptr) StubPolyConstraint(m_shouldValidate); - } - - size_t sizeOf() const override - { - return sizeof(StubPolyConstraint); - } - - bool validate( - const Adapter &, - const std::vector &context, - ValidationResults *results) const override - { - if (m_shouldValidate) { - return true; - } - - if (results) { - results->pushError(context, - "StubPolyConstraint intentionally failed validation"); - } - - return false; - } -}; - -} // end anonymous namespace - -class TestPolyConstraint : public testing::Test -{ - -}; - -TEST_F(TestPolyConstraint, ValidationCanPass) -{ - StubPolyConstraint stubPolyConstraint(true); - - Schema schema; - schema.addConstraintToSubschema(stubPolyConstraint, schema.root()); - - rapidjson::Document document; - RapidJsonAdapter adapter(document); - - ValidationResults results; - - Validator validator; - EXPECT_TRUE(validator.validate(schema, adapter, &results)); - EXPECT_EQ(size_t(0), results.numErrors()); -} - -TEST_F(TestPolyConstraint, ValidationCanFail) -{ - StubPolyConstraint stubPolyConstraint(false); - - Schema schema; - schema.addConstraintToSubschema(stubPolyConstraint, schema.root()); - - rapidjson::Document document; - RapidJsonAdapter adapter(document); - - ValidationResults results; - - Validator validator; - EXPECT_FALSE(validator.validate(schema, adapter, &results)); - EXPECT_EQ(size_t(1), results.numErrors()); - - ValidationResults::Error error; - EXPECT_TRUE(results.popError(error)); - EXPECT_STREQ("StubPolyConstraint intentionally failed validation", error.description.c_str()); -} diff --git a/src/Valijson/valijson/tests/test_property_tree_adapter.cpp b/src/Valijson/valijson/tests/test_property_tree_adapter.cpp deleted file mode 100644 index 45e2dc15bc..0000000000 --- a/src/Valijson/valijson/tests/test_property_tree_adapter.cpp +++ /dev/null @@ -1,91 +0,0 @@ - -#include - -#include - -class TestPropertyTreeAdapter : public testing::Test -{ - -}; - -TEST_F(TestPropertyTreeAdapter, BasicArrayIteration) -{ - const unsigned int numElements = 10; - - // Create a boost property tree that is equivalent to a JSON array containing a - // list of numbers. - boost::property_tree::ptree document; - for (unsigned int i = 0; i < numElements; i++) { - document.push_back(std::make_pair(std::string(), - boost::property_tree::ptree(std::to_string(i)))); - } - - // Ensure that wrapping the document preserves the array and does not allow - // it to be cast to other types - valijson::adapters::PropertyTreeAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the array contains the expected number of elements - EXPECT_EQ( numElements, adapter.getArray().size() ); - - // Ensure that the elements are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::PropertyTreeAdapter value : adapter.getArray()) { - ASSERT_TRUE( value.isString() ); - ASSERT_FALSE( value.isNumber() ); - ASSERT_TRUE( value.maybeDouble() ); - EXPECT_EQ( double(expectedValue), value.asDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ(numElements, expectedValue); -} - -TEST_F(TestPropertyTreeAdapter, BasicObjectIteration) -{ - const unsigned int numElements = 10; - - // Create a boost property tree that consists of an object that maps numeric - // strings their corresponding numeric values - boost::property_tree::ptree document; - for (unsigned int i = 0; i < numElements; i++) { - std::string name(std::to_string(i)); - document.push_back(std::make_pair(name, boost::property_tree::ptree( - std::to_string(double(i))))); - } - - // Ensure that wrapping the document preserves the object and does not - // allow it to be cast to other types - valijson::adapters::PropertyTreeAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the object contains the expected number of members - EXPECT_EQ( numElements, adapter.getObject().size() ); - - // Ensure that the members are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::PropertyTreeAdapter::ObjectMember member : adapter.getObject()) { - ASSERT_TRUE( member.second.isString() ); - ASSERT_FALSE( member.second.isNumber() ); - ASSERT_TRUE( member.second.maybeDouble() ); - EXPECT_EQ( std::to_string(expectedValue), member.first ); - EXPECT_EQ( double(expectedValue), member.second.asDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ( numElements, expectedValue ); -} diff --git a/src/Valijson/valijson/tests/test_qtjson_adapter.cpp b/src/Valijson/valijson/tests/test_qtjson_adapter.cpp deleted file mode 100644 index 14289e2a59..0000000000 --- a/src/Valijson/valijson/tests/test_qtjson_adapter.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include - -#include - -#include - -class TestQtJsonAdapter : public testing::Test -{ - -}; - -TEST_F(TestQtJsonAdapter, BasicArrayIteration) -{ - const unsigned int numElements = 10; - - // Create a picojson document that consists of an array of numbers - QJsonArray array; - for (unsigned int i = 0; i < numElements; i++) { - QJsonValue value(static_cast(i)); - array.push_back(value); - } - QJsonValue document(array); - - // Ensure that wrapping the document preserves the array and does not allow - // it to be cast to other types - valijson::adapters::QtJsonAdapter adapter(document); - ASSERT_NO_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getString() ); - - // Ensure that the array contains the expected number of elements - EXPECT_EQ( numElements, adapter.getArray().size() ); - - // Ensure that the elements are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::QtJsonAdapter value : adapter.getArray()) { - ASSERT_TRUE( value.isNumber() ); - EXPECT_EQ( double(expectedValue), value.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ(numElements, expectedValue); -} - -TEST_F(TestQtJsonAdapter, BasicObjectIteration) -{ - const unsigned int numElements = 10; - - // Create a picojson document that consists of an object that maps numeric - // strings their corresponding numeric values - QJsonObject object; - for (unsigned int i = 0; i < numElements; i++) { - QString name(QString::number(i)); - object[name] = QJsonValue(static_cast(i)); - } - QJsonValue document(object); - - // Ensure that wrapping the document preserves the object and does not - // allow it to be cast to other types - valijson::adapters::QtJsonAdapter adapter(document); - ASSERT_NO_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getString() ); - - // Ensure that the object contains the expected number of members - EXPECT_EQ( numElements, adapter.getObject().size() ); - - // Ensure that the members are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::QtJsonAdapter::ObjectMember member : adapter.getObject()) { - ASSERT_TRUE( member.second.isNumber() ); - EXPECT_EQ( std::to_string(expectedValue), member.first ); - EXPECT_EQ( double(expectedValue), member.second.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ( numElements, expectedValue ); -} diff --git a/src/Valijson/valijson/tests/test_rapidjson_adapter.cpp b/src/Valijson/valijson/tests/test_rapidjson_adapter.cpp deleted file mode 100644 index 9ce487ac97..0000000000 --- a/src/Valijson/valijson/tests/test_rapidjson_adapter.cpp +++ /dev/null @@ -1,113 +0,0 @@ -#include - -#include - -#include - -class TestRapidJsonAdapter : public testing::Test -{ - -}; - -template -void testBasicArrayIteration() -{ - const unsigned int numElements = 10; - - // Create a rapidjson document that consists of an array of numbers - rapidjson::Document document; - document.SetArray(); - for (unsigned int i = 0; i < numElements; i++) { - rapidjson::Value value; - value.SetDouble(i); - document.PushBack(value, document.GetAllocator()); - } - - // Ensure that wrapping the document preserves the array and does not allow - // it to be cast to other types - valijson::adapters::RapidJsonAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the array contains the expected number of elements - EXPECT_EQ( numElements, adapter.getArray().size() ); - - // Ensure that the elements are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::RapidJsonAdapter value : adapter.getArray()) { - ASSERT_TRUE( value.isNumber() ); - EXPECT_EQ( double(expectedValue), value.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ(numElements, expectedValue); -} - -template -void testBasicObjectIteration() -{ - const unsigned int numElements = 10; - - // Create a rapidjson document that consists of an object that maps numeric - // strings their corresponding numeric values - rapidjson::Document document; - document.SetObject(); - for (unsigned int i = 0; i < numElements; i++) { - rapidjson::Value name, value; - name.SetString(std::to_string(i).c_str(), document.GetAllocator()); - value.SetDouble(i); - document.AddMember(name, value, document.GetAllocator()); - } - - // Ensure that wrapping the document preserves the object and does not - // allow it to be cast to other types - valijson::adapters::RapidJsonAdapter adapter(document); -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW( adapter.getObject() ); - ASSERT_ANY_THROW( adapter.getArray() ); - ASSERT_ANY_THROW( adapter.getBool() ); - ASSERT_ANY_THROW( adapter.getDouble() ); - ASSERT_ANY_THROW( adapter.getString() ); -#endif - - // Ensure that the object contains the expected number of members - EXPECT_EQ( numElements, adapter.getObject().size() ); - - // Ensure that the members are returned in the order they were inserted - unsigned int expectedValue = 0; - for (const valijson::adapters::RapidJsonAdapter::ObjectMember member : adapter.getObject()) { - ASSERT_TRUE( member.second.isNumber() ); - EXPECT_EQ( std::to_string(expectedValue), member.first ); - EXPECT_EQ( double(expectedValue), member.second.getDouble() ); - expectedValue++; - } - - // Ensure that the correct number of elements were iterated over - EXPECT_EQ( numElements, expectedValue ); -} - -TEST_F(TestRapidJsonAdapter, BasicArrayIteration) -{ - // Test using default RapidJson value type, which uses MemoryPoolAllocator - testBasicArrayIteration(); - - // Test using value type based on CrtAllocator - testBasicArrayIteration, - rapidjson::CrtAllocator> >(); -} - -TEST_F(TestRapidJsonAdapter, BasicObjectIteration) -{ - // Test using default RapidJson value type, which uses MemoryPoolAllocator - testBasicObjectIteration(); - - // Test using value type based on CrtAllocator - testBasicObjectIteration, - rapidjson::CrtAllocator> >(); -} diff --git a/src/Valijson/valijson/tests/test_validation_errors.cpp b/src/Valijson/valijson/tests/test_validation_errors.cpp deleted file mode 100644 index 18a342c1ac..0000000000 --- a/src/Valijson/valijson/tests/test_validation_errors.cpp +++ /dev/null @@ -1,100 +0,0 @@ -#include - -#include - -#include -#include -#include -#include -#include -#include - -#define TEST_DATA_DIR "../tests/data" - -using std::string; - -using valijson::adapters::AdapterTraits; -using valijson::adapters::RapidJsonAdapter; -using valijson::utils::loadDocument; -using valijson::Schema; -using valijson::SchemaParser; -using valijson::Validator; -using valijson::ValidationResults; - -class TestValidationErrors : public ::testing::Test -{ - -}; - -TEST_F(TestValidationErrors, AllOfConstraintFailure) -{ - // Load schema document - rapidjson::Document schemaDocument; - ASSERT_TRUE( loadDocument(TEST_DATA_DIR "/schemas/allof_integers_and_numbers.schema.json", schemaDocument) ); - RapidJsonAdapter schemaAdapter(schemaDocument); - - // Parse schema document - Schema schema; - SchemaParser schemaParser; -#if VALIJSON_USE_EXCEPTIONS - ASSERT_NO_THROW(schemaParser.populateSchema(schemaAdapter, schema)); -#else - schemaParser.populateSchema(schemaAdapter, schema); -#endif - - // Load test document - rapidjson::Document testDocument; - ASSERT_TRUE( loadDocument(TEST_DATA_DIR "/documents/array_doubles_1_2_3.json", testDocument) ); - RapidJsonAdapter testAdapter(testDocument); - - Validator validator; - ValidationResults results; - EXPECT_FALSE( validator.validate(schema, testAdapter, &results) ); - - ValidationResults::Error error; - - EXPECT_TRUE( results.popError(error) ); - EXPECT_EQ( size_t(2), error.context.size() ); - EXPECT_EQ( "", error.context[0] ); - EXPECT_EQ( "[0]", error.context[1] ); - EXPECT_EQ( "Value type not permitted by 'type' constraint.", error.description ); - - EXPECT_TRUE( results.popError(error) ); - EXPECT_EQ( size_t(1), error.context.size() ); - EXPECT_EQ( "", error.context[0] ); - EXPECT_EQ( "Failed to validate item #0 in array.", error.description ); - - EXPECT_TRUE( results.popError(error) ); - EXPECT_EQ( size_t(2), error.context.size() ); - EXPECT_EQ( "", error.context[0] ); - EXPECT_EQ( "[1]", error.context[1] ); - EXPECT_EQ( "Value type not permitted by 'type' constraint.", error.description ); - - EXPECT_TRUE( results.popError(error) ); - EXPECT_EQ( size_t(1), error.context.size() ); - EXPECT_EQ( "", error.context[0] ); - EXPECT_EQ( "Failed to validate item #1 in array.", error.description ); - - EXPECT_TRUE( results.popError(error) ); - EXPECT_EQ( size_t(2), error.context.size() ); - EXPECT_EQ( "", error.context[0] ); - EXPECT_EQ( "[2]", error.context[1] ); - EXPECT_EQ( "Value type not permitted by 'type' constraint.", error.description ); - - EXPECT_TRUE( results.popError(error) ); - EXPECT_EQ( size_t(1), error.context.size() ); - EXPECT_EQ( "", error.context[0] ); - EXPECT_EQ( "Failed to validate item #2 in array.", error.description ); - - EXPECT_TRUE( results.popError(error) ); - EXPECT_EQ( size_t(1), error.context.size() ); - EXPECT_EQ( "", error.context[0] ); - EXPECT_EQ( "Failed to validate against child schema #0.", error.description ); - - EXPECT_FALSE( results.popError(error) ); - - while (results.popError(error)) { - //std::cerr << error.context << std::endl; - std::cerr << error.description << std::endl; - } -} diff --git a/src/Valijson/valijson/tests/test_validator.cpp b/src/Valijson/valijson/tests/test_validator.cpp deleted file mode 100644 index 6e8d971350..0000000000 --- a/src/Valijson/valijson/tests/test_validator.cpp +++ /dev/null @@ -1,607 +0,0 @@ -#ifdef _MSC_VER -#pragma warning(disable: 4706) -#include -#pragma warning(default: 4706) -#else -#include -#endif - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef VALIJSON_BUILD_POCO_ADAPTER -#include -#include -#endif - -#define REMOTES_DIR "../thirdparty/JSON-Schema-Test-Suite/remotes/" - -#define TEST_SUITE_DIR "../thirdparty/JSON-Schema-Test-Suite/tests/" - -using valijson::adapters::AdapterTraits; -using valijson::adapters::RapidJsonAdapter; -using valijson::Schema; -using valijson::SchemaParser; -using valijson::Validator; - -std::string getRelativePath(const std::string &uri) -{ - const std::string dummyUri = "http://localhost:1234/"; - if (uri.find(dummyUri) != std::string::npos) { - return REMOTES_DIR + uri.substr(dummyUri.size()); - } - - static const std::map schemaMap = { - { "http://json-schema.org/draft-03/schema", "../doc/schema/draft-03.json" }, - { "http://json-schema.org/draft-04/schema", "../doc/schema/draft-04.json" }, - { "http://json-schema.org/draft-07/schema", "../doc/schema/draft-07.json" } - }; - - const auto itr = schemaMap.find(uri); - if (itr != schemaMap.end()) { - return itr->second; - } - - valijson::throwRuntimeError("Attempt fetchDoc of " + uri); -} - -template -const typename AdapterTraits::DocumentType * fetchDocument( - const std::string &uri) -{ - const std::string relativePath = getRelativePath(uri); - - typename AdapterTraits::DocumentType *document = - new typename AdapterTraits::DocumentType(); - - if (!valijson::utils::loadDocument(relativePath, *document)) { - delete document; - valijson::throwRuntimeError("Failed fetchDoc of " + uri); - } - - return document; -} - -template -void freeDocument(const typename AdapterTraits::DocumentType *ptr) -{ - delete ptr; -} - -class TestValidator : public ::testing::TestWithParam -{ -protected: - - template - static void processTestFile(const std::string &testFile, - const SchemaParser::Version version) - { - std::string currentTestCase; - std::string currentTest; - -#if VALIJSON_USE_EXCEPTIONS - try { -#endif - // Load test document - typename AdapterTraits::DocumentType document; - ASSERT_TRUE( valijson::utils::loadDocument(testFile, document) ); - AdapterType testCases(document); - ASSERT_TRUE( testCases.isArray() ); - - // Process each test case in the file - for (const AdapterType testCase : testCases.getArray()) { - currentTestCase.clear(); - currentTest.clear(); - - // Ensure that testCase is an object - ASSERT_TRUE( testCase.isObject() ); - const typename AdapterType::Object object = testCase.getObject(); - - // Get test case description - typename AdapterType::Object::const_iterator itr = object.find("description"); - ASSERT_NE( object.end(), itr ); - currentTestCase = itr->second.getString(); - - // Ensure that 'schema' property is present - itr = object.find("schema"); - ASSERT_NE( object.end(), itr ); - - // Parse schema - Schema schema; - SchemaParser parser(version); - parser.populateSchema(itr->second, schema, - fetchDocument, freeDocument); - - // For each test in the 'tests' array - itr = object.find("tests"); - ASSERT_NE( object.end(), itr ); - ASSERT_TRUE( itr->second.isArray() ); - for (const AdapterType test : itr->second.getArray()) { - const bool strict = itr->second.hasStrictTypes(); - - ASSERT_TRUE( test.isObject() ); - const typename AdapterType::Object testObject = test.getObject(); - - typename AdapterType::Object::const_iterator testItr = testObject.find("valid"); - ASSERT_NE( testObject.end(), testItr ); - ASSERT_TRUE( testItr->second.maybeBool() ); - const bool shouldValidate = testItr->second.getBool(); - - testItr = testObject.find("description"); - ASSERT_NE( testObject.end(), testItr ); - currentTest = testItr->second.getString(); - - testItr = testObject.find("data"); - ASSERT_NE( testObject.end(), testItr ); - Validator validator(strict ? - Validator::kStrongTypes : Validator::kWeakTypes); - - EXPECT_EQ( shouldValidate, validator.validate(schema, testItr->second, NULL) ) - << "Failed while testing validate() function in '" - << currentTest << "' of test case '" - << currentTestCase << "' with adapter '" - << AdapterTraits::adapterName() << "'"; - } - } -#if VALIJSON_USE_EXCEPTIONS - } catch (const std::exception &e) { - FAIL() << "Exception thrown with message '" << e.what() - << "' in '" << currentTest << "' of test case '" - << currentTestCase << "' with adapter '" - << AdapterTraits::adapterName() << "'"; - } -#endif - } - - void processTestFile(const std::string &testFile, - const SchemaParser::Version version) - { - processTestFile(testFile, version); - processTestFile(testFile, version); - processTestFile(testFile, version); - processTestFile(testFile, version); - -#ifdef VALIJSON_BUILD_POCO_ADAPTER - processTestFile(testFile, version); -#endif // VALIJSON_BUILD_POCO_ADAPTER - } - - void processDraft3TestFile(const std::string &testFile) - { - return processTestFile(testFile, SchemaParser::kDraft3); - } - - void processDraft4TestFile(const std::string &testFile) - { - return processTestFile(testFile, SchemaParser::kDraft4); - } - - void processDraft7TestFile(const std::string &testFile) - { - return processTestFile(testFile, SchemaParser::kDraft7); - } -}; - -// -// draft 3 -// ------------------------------------------------------------------------------------------------ -// - -TEST_F(TestValidator, Draft3_AdditionalItems) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/additionalItems.json"); -} - -TEST_F(TestValidator, Draft3_AdditionalProperties) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/additionalProperties.json"); -} - -TEST_F(TestValidator, Draft3_Dependencies) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/dependencies.json"); -} - -TEST_F(TestValidator, Draft3_DivisibleBy) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/divisibleBy.json"); -} - -TEST_F(TestValidator, Draft3_Enum) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/enum.json"); -} - -TEST_F(TestValidator, Draft3_Items) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/items.json"); -} - -TEST_F(TestValidator, Draft3_Maximum) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/maximum.json"); -} - -TEST_F(TestValidator, Draft3_MaxItems) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/maxItems.json"); -} - -TEST_F(TestValidator, Draft3_MaxLength) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/maxLength.json"); -} - -TEST_F(TestValidator, Draft3_Minimum) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/minimum.json"); -} - -TEST_F(TestValidator, Draft3_MinItems) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/minItems.json"); -} - -TEST_F(TestValidator, Draft3_MinLength) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/minLength.json"); -} - -TEST_F(TestValidator, Draft3_Pattern) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/pattern.json"); -} - -TEST_F(TestValidator, Draft3_PatternProperties) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/patternProperties.json"); -} - -TEST_F(TestValidator, Draft3_Properties) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/properties.json"); -} - -TEST_F(TestValidator, Draft3_Ref) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/ref.json"); -} - -TEST_F(TestValidator, Draft3_RefRemote) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/refRemote.json"); -} - -TEST_F(TestValidator, Draft3_Required) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/required.json"); -} - -TEST_F(TestValidator, Draft3_Type) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/type.json"); -} - -TEST_F(TestValidator, Draft3_UniqueItems) -{ - processDraft3TestFile(TEST_SUITE_DIR "draft3/uniqueItems.json"); -} - -// -// draft 4 -// ------------------------------------------------------------------------------------------------ -// - -TEST_F(TestValidator, Draft4_AdditionalItems) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/additionalItems.json"); -} - -TEST_F(TestValidator, Draft4_AdditionalProperties) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/additionalProperties.json"); -} - -TEST_F(TestValidator, Draft4_AllOf) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/allOf.json"); -} - -TEST_F(TestValidator, Draft4_AnyOf) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/anyOf.json"); -} - -TEST_F(TestValidator, Draft4_Dependencies) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/dependencies.json"); -} - -TEST_F(TestValidator, Draft4_Enum) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/enum.json"); -} - -TEST_F(TestValidator, Draft4_Items) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/items.json"); -} - -TEST_F(TestValidator, Draft4_Maximum) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/maximum.json"); -} - -TEST_F(TestValidator, Draft4_MaxItems) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/maxItems.json"); -} - -TEST_F(TestValidator, Draft4_MaxLength) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/maxLength.json"); -} - -TEST_F(TestValidator, Draft4_MaxProperties) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/maxProperties.json"); -} - -TEST_F(TestValidator, Draft4_Minimum) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/minimum.json"); -} - -TEST_F(TestValidator, Draft4_MinItems) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/minItems.json"); -} - -TEST_F(TestValidator, Draft4_MinLength) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/minLength.json"); -} - -TEST_F(TestValidator, Draft4_MinProperties) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/minProperties.json"); -} - -TEST_F(TestValidator, Draft4_MultipleOf) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/multipleOf.json"); -} - -TEST_F(TestValidator, Draft4_Not) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/not.json"); -} - -TEST_F(TestValidator, Draft4_OneOf) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/oneOf.json"); -} - -TEST_F(TestValidator, Draft4_Pattern) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/pattern.json"); -} - -TEST_F(TestValidator, Draft4_PatternProperties) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/patternProperties.json"); -} - -TEST_F(TestValidator, Draft4_Properties) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/properties.json"); -} - -// TODO: broken ref - -// TODO: broken refRemote - -TEST_F(TestValidator, Draft4_Required) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/required.json"); -} - -TEST_F(TestValidator, Draft4_Type) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/type.json"); -} - -TEST_F(TestValidator, Draft4_UniqueItems) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft4/uniqueItems.json"); -} - -// -// draft 7 -// ------------------------------------------------------------------------------------------------ -// - -TEST_F(TestValidator, Draft7_AdditionalItems) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/additionalItems.json"); -} - -TEST_F(TestValidator, Draft7_AdditionalProperties) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/additionalProperties.json"); -} - -TEST_F(TestValidator, Draft7_AllOf) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/allOf.json"); -} - -TEST_F(TestValidator, Draft7_AnyOf) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/anyOf.json"); -} - -TEST_F(TestValidator, Draft7_BooleanSchema) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/boolean_schema.json"); -} - -TEST_F(TestValidator, Draft7_Const) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/const.json"); -} - -TEST_F(TestValidator, Draft7_Contains) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/contains.json"); -} - -TEST_F(TestValidator, Draft7_Default) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/default.json"); -} - -TEST_F(TestValidator, Draft7_Definitions) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/definitions.json"); -} - -TEST_F(TestValidator, Draft7_Dependencies) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/dependencies.json"); -} - -TEST_F(TestValidator, Draft7_Enum) -{ - processDraft4TestFile(TEST_SUITE_DIR "draft7/enum.json"); -} - -TEST_F(TestValidator, Draft7_ExclusiveMaximum) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/exclusiveMaximum.json"); -} - -TEST_F(TestValidator, Draft7_ExclusiveMinimum) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/exclusiveMinimum.json"); -} - -TEST_F(TestValidator, Draft7_IfThenElse) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/if-then-else.json"); -} - -TEST_F(TestValidator, Draft7_Items) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/items.json"); -} - -TEST_F(TestValidator, Draft7_Maximum) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/maximum.json"); -} - -TEST_F(TestValidator, Draft7_MaxItems) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/maxItems.json"); -} - -TEST_F(TestValidator, Draft7_MaxLength) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/maxLength.json"); -} - -TEST_F(TestValidator, Draft7_MaxProperties) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/maxProperties.json"); -} - -TEST_F(TestValidator, Draft7_Minimum) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/minimum.json"); -} - -TEST_F(TestValidator, Draft7_MinItems) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/minItems.json"); -} - -TEST_F(TestValidator, Draft7_MinLength) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/minLength.json"); -} - -TEST_F(TestValidator, Draft7_MinProperties) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/minProperties.json"); -} - -TEST_F(TestValidator, Draft7_MultipleOf) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/multipleOf.json"); -} - -TEST_F(TestValidator, Draft7_Not) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/not.json"); -} - -TEST_F(TestValidator, Draft7_OneOf) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/oneOf.json"); -} - -TEST_F(TestValidator, Draft7_Pattern) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/pattern.json"); -} - -TEST_F(TestValidator, Draft7_PatternProperties) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/patternProperties.json"); -} - -TEST_F(TestValidator, Draft7_Properties) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/properties.json"); -} - -TEST_F(TestValidator, Draft7_PropertyNames) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/propertyNames.json"); -} - -// TODO: broken ref - -// TODO: broken refRemote - -TEST_F(TestValidator, Draft7_Required) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/required.json"); -} - -TEST_F(TestValidator, Draft7_Type) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/type.json"); -} - -TEST_F(TestValidator, Draft7_UniqueItems) -{ - processDraft7TestFile(TEST_SUITE_DIR "draft7/uniqueItems.json"); -} diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/.gitignore b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/.gitignore deleted file mode 100644 index 1333ed77b7..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/.gitignore +++ /dev/null @@ -1 +0,0 @@ -TODO diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/.travis.yml b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/.travis.yml deleted file mode 100644 index 9c50823158..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: python -python: "2.7" -node_js: "9" -install: - - pip install tox - - npm install -script: - - tox - - npm test diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/LICENSE b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/LICENSE deleted file mode 100644 index c28adbadd9..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/README.md b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/README.md deleted file mode 100644 index 1145f4330c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/README.md +++ /dev/null @@ -1,181 +0,0 @@ -JSON Schema Test Suite [![Build Status](https://travis-ci.org/json-schema-org/JSON-Schema-Test-Suite.svg?branch=master)](https://travis-ci.org/json-schema-org/JSON-Schema-Test-Suite) -====================== - -This repository contains a set of JSON objects that implementors of JSON Schema -validation libraries can use to test their validators. - -It is meant to be language agnostic and should require only a JSON parser. - -The conversion of the JSON objects into tests within your test framework of -choice is still the job of the validator implementor. - -Structure of a Test -------------------- - -If you're going to use this suite, you need to know how tests are laid out. The -tests are contained in the `tests` directory at the root of this repository. - -Inside that directory is a subdirectory for each draft or version of the -schema. - -If you look inside the draft directory, there are a number of `.json` files, -which logically group a set of test cases together. Often the grouping is by -property under test, but not always, especially within optional test files -(discussed below). - -Inside each `.json` file is a single array containing objects. It's easiest to -illustrate the structure of these with an example: - -```json - { - "description": "the description of the test case", - "schema": {"the schema that should" : "be validated against"}, - "tests": [ - { - "description": "a specific test of a valid instance", - "data": "the instance", - "valid": true - }, - { - "description": "another specific test this time, invalid", - "data": 15, - "valid": false - } - ] - } -``` - -So a description, a schema, and some tests, where tests is an array containing -one or more objects with descriptions, data, and a boolean indicating whether -they should be valid or invalid. - -Coverage --------- - -Drafts 03, 04, 06, and 07 should have full coverage, with drafts 06 and 07 -being considered current and actively supported. Bug fixes will be made as -needed for draft-04 as it is still the most widely used, while draft-03 -is long since deprecated. - -If you see anything missing from the current supported drafts, or incorrect -on any draft still accepting bug fixes, please file an issue or submit a PR. - -Who Uses the Test Suite ------------------------ - -This suite is being used by: - -### Clojure ### - -* [json-schema](https://github.com/tatut/json-schema) -* [JSON Schema for Clojure(Script) (JUXT)](https://github.com/juxt/json-schema) - -### Coffeescript ### - -* [jsck](https://github.com/pandastrike/jsck) - -### C++ ### - -* [Modern C++ JSON schema validator](https://github.com/pboettch/json-schema-validator) - -### Dart ### - -* [json_schema](https://github.com/patefacio/json_schema) - -### Elixir ### - -* [ex_json_schema](https://github.com/jonasschmidt/ex_json_schema) - -### Erlang ### - -* [jesse](https://github.com/for-GET/jesse) - -### Go ### - -* [gojsonschema](https://github.com/sigu-399/gojsonschema) -* [validate-json](https://github.com/cesanta/validate-json) - -### Haskell ### - -* [aeson-schema](https://github.com/timjb/aeson-schema) -* [hjsonschema](https://github.com/seagreen/hjsonschema) - -### Java ### - -* [json-schema-validator](https://github.com/daveclayton/json-schema-validator) -* [everit-org/json-schema](https://github.com/everit-org/json-schema) -* [networknt/json-schema-validator](https://github.com/networknt/json-schema-validator) -* [Justify](https://github.com/leadpony/justify) - -### JavaScript ### - -* [json-schema-benchmark](https://github.com/Muscula/json-schema-benchmark) -* [direct-schema](https://github.com/IreneKnapp/direct-schema) -* [is-my-json-valid](https://github.com/mafintosh/is-my-json-valid) -* [jassi](https://github.com/iclanzan/jassi) -* [JaySchema](https://github.com/natesilva/jayschema) -* [json-schema-valid](https://github.com/ericgj/json-schema-valid) -* [Jsonary](https://github.com/jsonary-js/jsonary) -* [jsonschema](https://github.com/tdegrunt/jsonschema) -* [request-validator](https://github.com/bugventure/request-validator) -* [skeemas](https://github.com/Prestaul/skeemas) -* [tv4](https://github.com/geraintluff/tv4) -* [z-schema](https://github.com/zaggino/z-schema) -* [jsen](https://github.com/bugventure/jsen) -* [ajv](https://github.com/epoberezkin/ajv) -* [djv](https://github.com/korzio/djv) - -### Node.js ### - -For node.js developers, the suite is also available as an -[npm](https://www.npmjs.com/package/@json-schema-org/tests) package. - -Node-specific support is maintained in a [separate -repository](https://github.com/json-schema-org/json-schema-test-suite-npm) -which also welcomes your contributions! - -### .NET ### - -* [Newtonsoft.Json.Schema](https://github.com/JamesNK/Newtonsoft.Json.Schema) -* [Manatee.Json](https://github.com/gregsdennis/Manatee.Json) - -### PHP ### - -* [json-schema](https://github.com/justinrainbow/json-schema) -* [json-guard](https://github.com/thephpleague/json-guard) - -### PostgreSQL ### - -* [postgres-json-schema](https://github.com/gavinwahl/postgres-json-schema) -* [is_jsonb_valid](https://github.com/furstenheim/is_jsonb_valid) - -### Python ### - -* [jsonschema](https://github.com/Julian/jsonschema) -* [fastjsonschema](https://github.com/seznam/python-fastjsonschema) -* [hypothesis-jsonschema](https://github.com/Zac-HD/hypothesis-jsonschema) - -### Ruby ### - -* [json-schema](https://github.com/hoxworth/json-schema) -* [json_schemer](https://github.com/davishmcclurg/json_schemer) - -### Rust ### - -* [valico](https://github.com/rustless/valico) - -### Swift ### - -* [JSONSchema](https://github.com/kylef/JSONSchema.swift) - -If you use it as well, please fork and send a pull request adding yourself to -the list :). - -Contributing ------------- - -If you see something missing or incorrect, a pull request is most welcome! - -There are some sanity checks in place for testing the test suite. You can run -them with `bin/jsonschema_suite check && npm test` or `tox && npm test`. They will be run automatically by -[Travis CI](https://travis-ci.org/) as well. diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/index.js b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/index.js deleted file mode 100644 index b138226b17..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/index.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -const Ajv = require('ajv'); -const jsonSchemaTest = require('json-schema-test'); -const assert = require('assert'); - -const refs = { - 'http://localhost:1234/integer.json': require('./remotes/integer.json'), - 'http://localhost:1234/subSchemas.json': require('./remotes/subSchemas.json'), - 'http://localhost:1234/folder/folderInteger.json': require('./remotes/folder/folderInteger.json'), - 'http://localhost:1234/name.json': require('./remotes/name.json'), - 'http://localhost:1234/name-defs.json': require('./remotes/name-defs.json') -}; - -const SKIP = { - 4: ['optional/zeroTerminatedFloats'], - 7: [ - 'format/idn-email', - 'format/idn-hostname', - 'format/iri', - 'format/iri-reference', - 'optional/content' - ] -}; - -[4, 6, 7].forEach((draft) => { - let ajv; - if (draft == 7) { - ajv = new Ajv({format: 'full'}); - } else { - const schemaId = draft == 4 ? 'id' : '$id'; - ajv = new Ajv({format: 'full', meta: false, schemaId}); - ajv.addMetaSchema(require(`ajv/lib/refs/json-schema-draft-0${draft}.json`)); - ajv._opts.defaultMeta = `http://json-schema.org/draft-0${draft}/schema#`; - } - for (const uri in refs) ajv.addSchema(refs[uri], uri); - - jsonSchemaTest(ajv, { - description: `Test suite draft-0${draft}`, - suites: {tests: `./tests/draft${draft}/{**/,}*.json`}, - skip: SKIP[draft], - cwd: __dirname, - hideFolder: 'tests/' - }); -}); diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/package.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/package.json deleted file mode 100644 index 3980136cc6..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "json-schema-test-suite", - "version": "0.1.0", - "description": "A language agnostic test suite for the JSON Schema specifications", - "main": "index.js", - "scripts": { - "test": "mocha index.js -R spec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/json-schema-org/JSON-Schema-Test-Suite.git" - }, - "keywords": [ - "json-schema", - "tests" - ], - "author": "http://json-schema.org", - "license": "MIT", - "bugs": { - "url": "https://github.com/json-schema-org/JSON-Schema-Test-Suite/issues" - }, - "homepage": "https://github.com/json-schema-org/JSON-Schema-Test-Suite#readme", - "devDependencies": { - "ajv": "^6.0.0-rc.1", - "json-schema-test": "^2.0.0", - "mocha": "^3.2.0" - } -} diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/folder/folderInteger.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/folder/folderInteger.json deleted file mode 100644 index dbe5c758ee..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/folder/folderInteger.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "integer" -} \ No newline at end of file diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/integer.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/integer.json deleted file mode 100644 index dbe5c758ee..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/integer.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "integer" -} \ No newline at end of file diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/name-defs.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/name-defs.json deleted file mode 100644 index 1a4fe4ac2b..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/name-defs.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$defs": { - "orNull": { - "anyOf": [ - {"type": "null"}, - {"$ref": "#"} - ] - } - }, - "type": "string" -} diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/name.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/name.json deleted file mode 100644 index 19ba093552..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/name.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "definitions": { - "orNull": { - "anyOf": [ - {"type": "null"}, - {"$ref": "#"} - ] - } - }, - "type": "string" -} diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/subSchemas.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/subSchemas.json deleted file mode 100644 index 8b6d8f842f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/remotes/subSchemas.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "integer": { - "type": "integer" - }, - "refToInteger": { - "$ref": "#/integer" - } -} \ No newline at end of file diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/test-schema.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/test-schema.json deleted file mode 100644 index 670d2804cb..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/test-schema.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "outputItem": { - "type": "object", - "properties": { - "valid": {"type": "boolean"}, - "keywordLocation": {"type": "string"}, - "absoluteKeywordLocation": { - "type": "string", - "format": "uri" - }, - "instanceLocation": {"type": "string"}, - "annotations": { - "type": "array", - "items": {"$ref": "#/definitions/outputItem"} - }, - "errors": { - "type": "array", - "items": {"$ref": "#/definitions/outputItem"} - } - } - } - }, - "type": "array", - "items": { - "type": "object", - "required": ["description", "schema", "tests"], - "properties": { - "description": {"type": "string"}, - "schema": {}, - "tests": { - "type": "array", - "items": { - "type": "object", - "required": ["description", "data", "valid"], - "properties": { - "description": {"type": "string"}, - "data": {}, - "valid": {"type": "boolean"}, - "output": { - "type": "object", - "properties": { - "basic": {"$ref": "#/definitions/outputItem"}, - "detailed": {"$ref": "#/definitions/outputItem"}, - "verbose": {"$ref": "#/definitions/outputItem"} - }, - "required": ["basic", "detailed", "verbose"] - } - }, - "additionalProperties": false - }, - "minItems": 1 - } - }, - "additionalProperties": false, - "minItems": 1 - } -} diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/additionalItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/additionalItems.json deleted file mode 100644 index abecc578be..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/additionalItems.json +++ /dev/null @@ -1,87 +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": "items is schema, no additionalItems", - "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", - "schema": { - "items": [{}, {}, {}], - "additionalItems": false - }, - "tests": [ - { - "description": "fewer number of items present", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/additionalProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/additionalProperties.json deleted file mode 100644 index ffeac6b381..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/additionalProperties.json +++ /dev/null @@ -1,133 +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 allows a schema which should validate", - "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 should not look in applicators", - "schema": { - "allOf": [ - {"properties": {"foo": {}}} - ], - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "properties defined in allOf are not allowed", - "data": {"foo": 1, "bar": true}, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/allOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/allOf.json deleted file mode 100644 index eb612091aa..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/allOf.json +++ /dev/null @@ -1,218 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/anyOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/anyOf.json deleted file mode 100644 index ab5eb386b4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/boolean_schema.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/boolean_schema.json deleted file mode 100644 index 6d40f23f26..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/const.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/const.json deleted file mode 100644 index c089625dc4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/const.json +++ /dev/null @@ -1,170 +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 0 does not match false", - "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": "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/contains.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/contains.json deleted file mode 100644 index b7ae5a25fe..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/contains.json +++ /dev/null @@ -1,95 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/default.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/default.json deleted file mode 100644 index 17629779fb..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/default.json +++ /dev/null @@ -1,49 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/defs.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/defs.json deleted file mode 100644 index e3c298d37a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/defs.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "description": "valid definition", - "schema": {"$ref": "http://json-schema.org/draft/2019-06/schema#"}, - "tests": [ - { - "description": "valid definition schema", - "data": {"$defs": {"foo": {"type": "integer"}}}, - "valid": true - } - ] - }, - { - "description": "invalid definition", - "schema": {"$ref": "http://json-schema.org/draft/2019-06/schema#"}, - "tests": [ - { - "description": "invalid definition schema", - "data": {"$defs": {"foo": {"type": 1}}}, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/dependencies.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/dependencies.json deleted file mode 100644 index 8dd78aa5d8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/dependencies.json +++ /dev/null @@ -1,268 +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": "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": "empty array of dependencies", - "schema": { - "dependencies": { - "foo": [] - } - }, - "tests": [ - { - "description": "object with property is valid", - "data": { "foo": 1 }, - "valid": true - }, - { - "description": "empty object is valid", - "data": {}, - "valid": true - }, - { - "description": "non-object is valid", - "data": 1, - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/enum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/enum.json deleted file mode 100644 index 32d79026e1..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/enum.json +++ /dev/null @@ -1,179 +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": "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": "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 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 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 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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/exclusiveMaximum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/exclusiveMaximum.json deleted file mode 100644 index dc3cd709d3..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/exclusiveMinimum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/exclusiveMinimum.json deleted file mode 100644 index b38d7ecec6..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/if-then-else.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/if-then-else.json deleted file mode 100644 index be7328163d..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/if-then-else.json +++ /dev/null @@ -1,188 +0,0 @@ -[ - { - "description": "ignore if without then or else", - "schema": { - "if": { - "const": 0 - } - }, - "tests": [ - { - "description": "valid when valid against lone if", - "data": 0, - "valid": true - }, - { - "description": "valid when invalid against lone if", - "data": "hello", - "valid": true - } - ] - }, - { - "description": "ignore then without if", - "schema": { - "then": { - "const": 0 - } - }, - "tests": [ - { - "description": "valid when valid against lone then", - "data": 0, - "valid": true - }, - { - "description": "valid when invalid against lone then", - "data": "hello", - "valid": true - } - ] - }, - { - "description": "ignore else without if", - "schema": { - "else": { - "const": 0 - } - }, - "tests": [ - { - "description": "valid when valid against lone else", - "data": 0, - "valid": true - }, - { - "description": "valid when invalid against lone else", - "data": "hello", - "valid": true - } - ] - }, - { - "description": "if and then without else", - "schema": { - "if": { - "exclusiveMaximum": 0 - }, - "then": { - "minimum": -10 - } - }, - "tests": [ - { - "description": "valid through then", - "data": -1, - "valid": true - }, - { - "description": "invalid through then", - "data": -100, - "valid": false - }, - { - "description": "valid when if test fails", - "data": 3, - "valid": true - } - ] - }, - { - "description": "if and else without then", - "schema": { - "if": { - "exclusiveMaximum": 0 - }, - "else": { - "multipleOf": 2 - } - }, - "tests": [ - { - "description": "valid when if test passes", - "data": -1, - "valid": true - }, - { - "description": "valid through else", - "data": 4, - "valid": true - }, - { - "description": "invalid through else", - "data": 3, - "valid": false - } - ] - }, - { - "description": "validate against correct branch, then vs else", - "schema": { - "if": { - "exclusiveMaximum": 0 - }, - "then": { - "minimum": -10 - }, - "else": { - "multipleOf": 2 - } - }, - "tests": [ - { - "description": "valid through then", - "data": -1, - "valid": true - }, - { - "description": "invalid through then", - "data": -100, - "valid": false - }, - { - "description": "valid through else", - "data": 4, - "valid": true - }, - { - "description": "invalid through else", - "data": 3, - "valid": false - } - ] - }, - { - "description": "non-interference across combined schemas", - "schema": { - "allOf": [ - { - "if": { - "exclusiveMaximum": 0 - } - }, - { - "then": { - "minimum": -10 - } - }, - { - "else": { - "multipleOf": 2 - } - } - ] - }, - "tests": [ - { - "description": "valid, but would have been invalid through then", - "data": -100, - "valid": true - }, - { - "description": "valid, but would have been invalid through else", - "data": 3, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/items.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/items.json deleted file mode 100644 index 6e98ee82da..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/items.json +++ /dev/null @@ -1,250 +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": { - "$defs": { - "item": { - "type": "array", - "additionalItems": false, - "items": [ - { "$ref": "#/$defs/sub-item" }, - { "$ref": "#/$defs/sub-item" } - ] - }, - "sub-item": { - "type": "object", - "required": ["foo"] - } - }, - "type": "array", - "additionalItems": false, - "items": [ - { "$ref": "#/$defs/item" }, - { "$ref": "#/$defs/item" }, - { "$ref": "#/$defs/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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxItems.json deleted file mode 100644 index 3b53a6b371..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxLength.json deleted file mode 100644 index 811d35b253..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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 supplementary Unicode code points is long enough", - "data": "\uD83D\uDCA9\uD83D\uDCA9", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxProperties.json deleted file mode 100644 index 513731e4c8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maxProperties.json +++ /dev/null @@ -1,38 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maximum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maximum.json deleted file mode 100644 index 8150984ee5..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/maximum.json +++ /dev/null @@ -1,28 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minItems.json deleted file mode 100644 index ed5118815e..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minLength.json deleted file mode 100644 index 3f09158dee..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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 supplementary Unicode code point is not long enough", - "data": "\uD83D\uDCA9", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minProperties.json deleted file mode 100644 index 49a0726e01..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minimum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minimum.json deleted file mode 100644 index 2a9c42b3c4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/minimum.json +++ /dev/null @@ -1,59 +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": "below the minimum is invalid", - "data": -3, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/multipleOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/multipleOf.json deleted file mode 100644 index ca3b761805..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/multipleOf.json +++ /dev/null @@ -1,60 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/not.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/not.json deleted file mode 100644 index 98de0eda8d..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/not.json +++ /dev/null @@ -1,117 +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": "not with boolean schema true", - "schema": {"not": true}, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "not with boolean schema false", - "schema": {"not": false}, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/oneOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/oneOf.json deleted file mode 100644 index 57640b7afb..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/oneOf.json +++ /dev/null @@ -1,206 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/bignum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/bignum.json deleted file mode 100644 index fac275e21f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/bignum.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "description": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a 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": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a negative bignum is an integer", - "data": -12345678910111213141516171819202122232425262728293031, - "valid": true - } - ] - }, - { - "description": "number", - "schema": {"type": "number"}, - "tests": [ - { - "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": "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": "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/content.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/content.json deleted file mode 100644 index 3f5a7430b2..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/content.json +++ /dev/null @@ -1,77 +0,0 @@ -[ - { - "description": "validation of string-encoded content based on media type", - "schema": { - "contentMediaType": "application/json" - }, - "tests": [ - { - "description": "a valid JSON document", - "data": "{\"foo\": \"bar\"}", - "valid": true - }, - { - "description": "an invalid JSON document", - "data": "{:}", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 100, - "valid": true - } - ] - }, - { - "description": "validation of binary string-encoding", - "schema": { - "contentEncoding": "base64" - }, - "tests": [ - { - "description": "a valid base64 string", - "data": "eyJmb28iOiAiYmFyIn0K", - "valid": true - }, - { - "description": "an invalid base64 string (% is not a valid character)", - "data": "eyJmb28iOi%iYmFyIn0K", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 100, - "valid": true - } - ] - }, - { - "description": "validation of binary-encoded media type documents", - "schema": { - "contentMediaType": "application/json", - "contentEncoding": "base64" - }, - "tests": [ - { - "description": "a valid base64-encoded JSON document", - "data": "eyJmb28iOiAiYmFyIn0K", - "valid": true - }, - { - "description": "a validly-encoded invalid JSON document", - "data": "ezp9Cg==", - "valid": false - }, - { - "description": "an invalid base64 string that is valid JSON", - "data": "{}", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 100, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/ecmascript-regex.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/ecmascript-regex.json deleted file mode 100644 index 08dc9360b8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/ecmascript-regex.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "description": "ECMA 262 regex non-compliance", - "schema": { "format": "regex" }, - "tests": [ - { - "description": "ECMA 262 has no support for \\Z anchor from .NET", - "data": "^\\S(|(.|\\n)*\\S)\\Z", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/date-time.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/date-time.json deleted file mode 100644 index dfccee6e67..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/date-time.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "description": "validation of date-time strings", - "schema": {"format": "date-time"}, - "tests": [ - { - "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 invalid day in date-time string", - "data": "1990-02-31T15:59:60.123-08:00", - "valid": false - }, - { - "description": "an invalid offset in date-time string", - "data": "1990-12-31T15:59:60-24:00", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/date.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/date.json deleted file mode 100644 index cd23baae3a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/date.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "description": "validation of date strings", - "schema": {"format": "date"}, - "tests": [ - { - "description": "a valid date string", - "data": "1963-06-19", - "valid": true - }, - { - "description": "an invalid date-time string", - "data": "06/19/1963", - "valid": false - }, - { - "description": "only RFC3339 not all of ISO 8601 are valid", - "data": "2013-350", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/email.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/email.json deleted file mode 100644 index c837c84bc1..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/email.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "description": "validation of e-mail addresses", - "schema": {"format": "email"}, - "tests": [ - { - "description": "a valid e-mail address", - "data": "joe.bloggs@example.com", - "valid": true - }, - { - "description": "an invalid e-mail address", - "data": "2962", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/hostname.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/hostname.json deleted file mode 100644 index d22e57db03..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/hostname.json +++ /dev/null @@ -1,33 +0,0 @@ -[ - { - "description": "validation of host names", - "schema": {"format": "hostname"}, - "tests": [ - { - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/idn-email.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/idn-email.json deleted file mode 100644 index 637409ea8f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/idn-email.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "description": "validation of an internationalized e-mail addresses", - "schema": {"format": "idn-email"}, - "tests": [ - { - "description": "a valid idn e-mail (example@example.test in Hangul)", - "data": "실례@실례.테스트", - "valid": true - }, - { - "description": "an invalid idn e-mail address", - "data": "2962", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/idn-hostname.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/idn-hostname.json deleted file mode 100644 index 3291820e6f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/idn-hostname.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "validation of internationalized host names", - "schema": {"format": "idn-hostname"}, - "tests": [ - { - "description": "a valid host name (example.test in Hangul)", - "data": "실례.테스트", - "valid": true - }, - { - "description": "illegal first char U+302E Hangul single dot tone mark", - "data": "〮실례.테스트", - "valid": false - }, - { - "description": "contains illegal char U+302E Hangul single dot tone mark", - "data": "실〮례.테스트", - "valid": false - }, - { - "description": "a host name with a component too long", - "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/ipv4.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/ipv4.json deleted file mode 100644 index 661148a74d..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/ipv4.json +++ /dev/null @@ -1,33 +0,0 @@ -[ - { - "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, - "tests": [ - { - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/ipv6.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/ipv6.json deleted file mode 100644 index f67559b35d..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/ipv6.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, - "tests": [ - { - "description": "a valid IPv6 address", - "data": "::1", - "valid": true - }, - { - "description": "an IPv6 address with out-of-range values", - "data": "12345::", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/iri-reference.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/iri-reference.json deleted file mode 100644 index 1fd779c23c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/iri-reference.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "description": "validation of IRI References", - "schema": {"format": "iri-reference"}, - "tests": [ - { - "description": "a valid IRI", - "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", - "valid": true - }, - { - "description": "a valid protocol-relative IRI Reference", - "data": "//ƒøø.ßår/?∂éœ=πîx#πîüx", - "valid": true - }, - { - "description": "a valid relative IRI Reference", - "data": "/âππ", - "valid": true - }, - { - "description": "an invalid IRI Reference", - "data": "\\\\WINDOWS\\filëßåré", - "valid": false - }, - { - "description": "a valid IRI Reference", - "data": "âππ", - "valid": true - }, - { - "description": "a valid IRI fragment", - "data": "#ƒrägmênt", - "valid": true - }, - { - "description": "an invalid IRI fragment", - "data": "#ƒräg\\mênt", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/iri.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/iri.json deleted file mode 100644 index ed54094c01..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/iri.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "description": "validation of IRIs", - "schema": {"format": "iri"}, - "tests": [ - { - "description": "a valid IRI with anchor tag", - "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", - "valid": true - }, - { - "description": "a valid IRI with anchor tag and parantheses", - "data": "http://ƒøø.com/blah_(wîkïpédiå)_blah#ßité-1", - "valid": true - }, - { - "description": "a valid IRI with URL-encoded stuff", - "data": "http://ƒøø.ßår/?q=Test%20URL-encoded%20stuff", - "valid": true - }, - { - "description": "a valid IRI with many special characters", - "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", - "valid": true - }, - { - "description": "a valid IRI based on IPv6", - "data": "http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]", - "valid": true - }, - { - "description": "an invalid IRI based on IPv6", - "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334", - "valid": false - }, - { - "description": "an invalid relative IRI Reference", - "data": "/abc", - "valid": false - }, - { - "description": "an invalid IRI", - "data": "\\\\WINDOWS\\filëßåré", - "valid": false - }, - { - "description": "an invalid IRI though valid IRI reference", - "data": "âππ", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/json-pointer.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/json-pointer.json deleted file mode 100644 index 65c2f064f0..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/json-pointer.json +++ /dev/null @@ -1,168 +0,0 @@ -[ - { - "description": "validation of JSON-pointers (JSON String Representation)", - "schema": {"format": "json-pointer"}, - "tests": [ - { - "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/regex.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/regex.json deleted file mode 100644 index d99d021ec0..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/regex.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "description": "validation of regular expressions", - "schema": {"format": "regex"}, - "tests": [ - { - "description": "a valid regular expression", - "data": "([abc])+\\s+$", - "valid": true - }, - { - "description": "a regular expression with unclosed parens is invalid", - "data": "^(abc]", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/relative-json-pointer.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/relative-json-pointer.json deleted file mode 100644 index ceeb743a32..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/relative-json-pointer.json +++ /dev/null @@ -1,33 +0,0 @@ -[ - { - "description": "validation of Relative JSON Pointers (RJP)", - "schema": {"format": "relative-json-pointer"}, - "tests": [ - { - "description": "a valid upwards RJP", - "data": "1", - "valid": true - }, - { - "description": "a valid downwards RJP", - "data": "0/foo/bar", - "valid": true - }, - { - "description": "a valid up and then down RJP, with array index", - "data": "2/0/baz/1/zip", - "valid": true - }, - { - "description": "a valid RJP taking the member or index name", - "data": "0#", - "valid": true - }, - { - "description": "an invalid RJP that is a valid JSON Pointer", - "data": "/foo/bar", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/time.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/time.json deleted file mode 100644 index 4ec8a01a3e..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/time.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "description": "validation of time strings", - "schema": {"format": "time"}, - "tests": [ - { - "description": "a valid time string", - "data": "08:30:06.283185Z", - "valid": true - }, - { - "description": "an invalid time string", - "data": "08:30:06 PST", - "valid": false - }, - { - "description": "only RFC3339 not all of ISO 8601 are valid", - "data": "01:01:01,1111", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri-reference.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri-reference.json deleted file mode 100644 index e4c9eef63c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri-reference.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "description": "validation of URI References", - "schema": {"format": "uri-reference"}, - "tests": [ - { - "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri-template.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri-template.json deleted file mode 100644 index d8396a5a79..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri-template.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "description": "format: uri-template", - "schema": { - "format": "uri-template" - }, - "tests": [ - { - "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri.json deleted file mode 100644 index 25cc40c80a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/format/uri.json +++ /dev/null @@ -1,103 +0,0 @@ -[ - { - "description": "validation of URIs", - "schema": {"format": "uri"}, - "tests": [ - { - "description": "a valid URL with anchor tag", - "data": "http://foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "a valid URL with anchor tag and parantheses", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/zeroTerminatedFloats.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/optional/zeroTerminatedFloats.json deleted file mode 100644 index 1bcdf96036..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/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 without fractional part is an integer", - "data": 1.0, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/pattern.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/pattern.json deleted file mode 100644 index 25e7299731..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/pattern.json +++ /dev/null @@ -1,34 +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 non-strings", - "data": true, - "valid": true - } - ] - }, - { - "description": "pattern is not anchored", - "schema": {"pattern": "a+"}, - "tests": [ - { - "description": "matches a substring", - "data": "xxaayy", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/patternProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/patternProperties.json deleted file mode 100644 index 1d04a1675c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/patternProperties.json +++ /dev/null @@ -1,151 +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": "empty object is valid", - "data": {}, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/properties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/properties.json deleted file mode 100644 index b86c181982..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/properties.json +++ /dev/null @@ -1,167 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/propertyNames.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/propertyNames.json deleted file mode 100644 index 8423690d90..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/propertyNames.json +++ /dev/null @@ -1,78 +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 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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/ref.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/ref.json deleted file mode 100644 index dbeb7d3bba..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/ref.json +++ /dev/null @@ -1,443 +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": { - "tilda~field": {"type": "integer"}, - "slash/field": {"type": "integer"}, - "percent%field": {"type": "integer"}, - "properties": { - "tilda": {"$ref": "#/tilda~0field"}, - "slash": {"$ref": "#/slash~1field"}, - "percent": {"$ref": "#/percent%25field"} - } - }, - "tests": [ - { - "description": "slash invalid", - "data": {"slash": "aoeu"}, - "valid": false - }, - { - "description": "tilda invalid", - "data": {"tilda": "aoeu"}, - "valid": false - }, - { - "description": "percent invalid", - "data": {"percent": "aoeu"}, - "valid": false - }, - { - "description": "slash valid", - "data": {"slash": 123}, - "valid": true - }, - { - "description": "tilda valid", - "data": {"tilda": 123}, - "valid": true - }, - { - "description": "percent valid", - "data": {"percent": 123}, - "valid": true - } - ] - }, - { - "description": "nested refs", - "schema": { - "$defs": { - "a": {"type": "integer"}, - "b": {"$ref": "#/$defs/a"}, - "c": {"$ref": "#/$defs/b"} - }, - "$ref": "#/$defs/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": { - "$defs": { - "reffed": { - "type": "array" - } - }, - "properties": { - "foo": { - "$ref": "#/$defs/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": "remote ref, containing refs itself", - "schema": {"$ref": "http://json-schema.org/draft/2019-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": "$ref to boolean schema true", - "schema": { - "$ref": "#/$defs/bool", - "$defs": { - "bool": true - } - }, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "$ref to boolean schema false", - "schema": { - "$ref": "#/$defs/bool", - "$defs": { - "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"], - "$defs": { - "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": "#/$defs/foo%22bar"} - }, - "$defs": { - "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" - }], - "$defs": { - "A": { - "$id": "#foo", - "type": "integer" - } - } - }, - "tests": [ - { - "data": 1, - "description": "match", - "valid": true - }, - { - "data": "a", - "description": "mismatch", - "valid": false - } - ] - }, - { - "description": "Location-independent identifier with absolute URI", - "schema": { - "allOf": [{ - "$ref": "http://localhost:1234/bar#foo" - }], - "$defs": { - "A": { - "$id": "http://localhost:1234/bar#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" - }], - "$defs": { - "A": { - "$id": "nested.json", - "$defs": { - "B": { - "$id": "#foo", - "type": "integer" - } - } - } - } - }, - "tests": [ - { - "data": 1, - "description": "match", - "valid": true - }, - { - "data": "a", - "description": "mismatch", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/refRemote.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/refRemote.json deleted file mode 100644 index 9cadc92666..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/refRemote.json +++ /dev/null @@ -1,167 +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#/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#/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": "folder/", - "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": "#/$defs/baz"}}, - "$defs": { - "baz": { - "$id": "folder/", - "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": "#/$defs/baz/$defs/bar"}}, - "$defs": { - "baz": { - "$id": "folder/", - "$defs": { - "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-defs.json#/$defs/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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/required.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/required.json deleted file mode 100644 index abf18f3459..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/required.json +++ /dev/null @@ -1,105 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/type.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/type.json deleted file mode 100644 index ea33b1821f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/type.json +++ /dev/null @@ -1,464 +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 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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/uniqueItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/uniqueItems.json deleted file mode 100644 index 8885ed006f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft2019-08/uniqueItems.json +++ /dev/null @@ -1,89 +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": "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 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": "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": "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 invalid", - "data": [{}, [1], true, null, {}, 1], - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/additionalItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/additionalItems.json deleted file mode 100644 index 6d4bff51cf..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/additionalItems.json +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - "description": "additionalItems as schema", - "schema": { - "items": [], - "additionalItems": {"type": "integer"} - }, - "tests": [ - { - "description": "additional items match schema", - "data": [ 1, 2, 3, 4 ], - "valid": true - }, - { - "description": "additional items do not match schema", - "data": [ 1, 2, 3, "foo" ], - "valid": false - } - ] - }, - { - "description": "items is schema, no additionalItems", - "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", - "schema": { - "items": [{}, {}, {}], - "additionalItems": false - }, - "tests": [ - { - "description": "no additional 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": []}, - "tests": [ - { - "description": "only the first items are validated", - "data": [1, "foo", false], - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/additionalProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/additionalProperties.json deleted file mode 100644 index bfb0844a26..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/additionalProperties.json +++ /dev/null @@ -1,133 +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 allows a schema which should validate", - "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 should not look in applicators", - "schema": { - "extends": [ - {"properties": {"foo": {}}} - ], - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "properties defined in extends are not allowed", - "data": {"foo": 1, "bar": true}, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/default.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/default.json deleted file mode 100644 index 17629779fb..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/default.json +++ /dev/null @@ -1,49 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/dependencies.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/dependencies.json deleted file mode 100644 index d7e09256ab..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/dependencies.json +++ /dev/null @@ -1,118 +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": "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/disallow.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/disallow.json deleted file mode 100644 index a5c9d90cce..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/disallow.json +++ /dev/null @@ -1,80 +0,0 @@ -[ - { - "description": "disallow", - "schema": { - "disallow": "integer" - }, - "tests": [ - { - "description": "allowed", - "data": "foo", - "valid": true - }, - { - "description": "disallowed", - "data": 1, - "valid": false - } - ] - }, - { - "description": "multiple disallow", - "schema": { - "disallow": ["integer", "boolean"] - }, - "tests": [ - { - "description": "valid", - "data": "foo", - "valid": true - }, - { - "description": "mismatch", - "data": 1, - "valid": false - }, - { - "description": "other mismatch", - "data": true, - "valid": false - } - ] - }, - { - "description": "multiple disallow subschema", - "schema": { - "disallow": - ["string", - { - "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", - "valid": false - }, - { - "description": "other mismatch", - "data": {"foo": "bar"}, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/divisibleBy.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/divisibleBy.json deleted file mode 100644 index ef7cc14890..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/divisibleBy.json +++ /dev/null @@ -1,60 +0,0 @@ -[ - { - "description": "by int", - "schema": {"divisibleBy": 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": {"divisibleBy": 1.5}, - "tests": [ - { - "description": "zero is divisible by anything (except 0)", - "data": 0, - "valid": true - }, - { - "description": "4.5 is divisible by 1.5", - "data": 4.5, - "valid": true - }, - { - "description": "35 is not divisible by 1.5", - "data": 35, - "valid": false - } - ] - }, - { - "description": "by small number", - "schema": {"divisibleBy": 0.0001}, - "tests": [ - { - "description": "0.0075 is divisible by 0.0001", - "data": 0.0075, - "valid": true - }, - { - "description": "0.00751 is not divisible by 0.0001", - "data": 0.00751, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/enum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/enum.json deleted file mode 100644 index fc3e070707..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/enum.json +++ /dev/null @@ -1,71 +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": "enums in properties", - "schema": { - "type":"object", - "properties": { - "foo": {"enum":["foo"]}, - "bar": {"enum":["bar"], "required":true} - } - }, - "tests": [ - { - "description": "both properties are valid", - "data": {"foo":"foo", "bar":"bar"}, - "valid": true - }, - { - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/extends.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/extends.json deleted file mode 100644 index 909bce575a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/extends.json +++ /dev/null @@ -1,94 +0,0 @@ -[ - { - "description": "extends", - "schema": { - "properties": {"bar": {"type": "integer", "required": true}}, - "extends": { - "properties": { - "foo": {"type": "string", "required": true} - } - } - }, - "tests": [ - { - "description": "extends", - "data": {"foo": "baz", "bar": 2}, - "valid": true - }, - { - "description": "mismatch extends", - "data": {"foo": "baz"}, - "valid": false - }, - { - "description": "mismatch extended", - "data": {"bar": 2}, - "valid": false - }, - { - "description": "wrong type", - "data": {"foo": "baz", "bar": "quux"}, - "valid": false - } - ] - }, - { - "description": "multiple extends", - "schema": { - "properties": {"bar": {"type": "integer", "required": true}}, - "extends" : [ - { - "properties": { - "foo": {"type": "string", "required": true} - } - }, - { - "properties": { - "baz": {"type": "null", "required": true} - } - } - ] - }, - "tests": [ - { - "description": "valid", - "data": {"foo": "quux", "bar": 2, "baz": null}, - "valid": true - }, - { - "description": "mismatch first extends", - "data": {"bar": 2, "baz": null}, - "valid": false - }, - { - "description": "mismatch second extends", - "data": {"foo": "quux", "bar": 2}, - "valid": false - }, - { - "description": "mismatch both", - "data": {"bar": 2}, - "valid": false - } - ] - }, - { - "description": "extends simple types", - "schema": { - "minimum": 20, - "extends": {"maximum": 30} - }, - "tests": [ - { - "description": "valid", - "data": 25, - "valid": true - }, - { - "description": "mismatch extends", - "data": 35, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/items.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/items.json deleted file mode 100644 index f5e18a1384..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/items.json +++ /dev/null @@ -1,46 +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": "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maxItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maxItems.json deleted file mode 100644 index 3b53a6b371..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maxLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maxLength.json deleted file mode 100644 index 4de42bcaba..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/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": 10, - "valid": true - }, - { - "description": "two supplementary Unicode code points is long enough", - "data": "\uD83D\uDCA9\uD83D\uDCA9", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maximum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maximum.json deleted file mode 100644 index 86c7b89c9a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/maximum.json +++ /dev/null @@ -1,42 +0,0 @@ -[ - { - "description": "maximum validation", - "schema": {"maximum": 3.0}, - "tests": [ - { - "description": "below the maximum is valid", - "data": 2.6, - "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minItems.json deleted file mode 100644 index ed5118815e..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minLength.json deleted file mode 100644 index 3f09158dee..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/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 supplementary Unicode code point is not long enough", - "data": "\uD83D\uDCA9", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minimum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minimum.json deleted file mode 100644 index 5ac9feefef..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/minimum.json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "description": "minimum validation", - "schema": {"minimum": 1.1}, - "tests": [ - { - "description": "above the minimum is valid", - "data": 2.6, - "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": "below the minimum is invalid", - "data": -3, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/bignum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/bignum.json deleted file mode 100644 index ccc7c17fe8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/bignum.json +++ /dev/null @@ -1,107 +0,0 @@ -[ - { - "description": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a 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": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a negative bignum is an integer", - "data": -12345678910111213141516171819202122232425262728293031, - "valid": true - } - ] - }, - { - "description": "number", - "schema": {"type": "number"}, - "tests": [ - { - "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": "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": "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/format.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/format.json deleted file mode 100644 index 9864589dd2..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/format.json +++ /dev/null @@ -1,227 +0,0 @@ -[ - { - "description": "validation of regular expressions", - "schema": {"format": "regex"}, - "tests": [ - { - "description": "a valid regular expression", - "data": "([abc])+\\s+$", - "valid": true - }, - { - "description": "a regular expression with unclosed parens is invalid", - "data": "^(abc]", - "valid": false - } - ] - }, - { - "description": "validation of date-time strings", - "schema": {"format": "date-time"}, - "tests": [ - { - "description": "a valid date-time string", - "data": "1963-06-19T08:30:06.283185Z", - "valid": true - }, - { - "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": "validation of date strings", - "schema": {"format": "date"}, - "tests": [ - { - "description": "a valid date string", - "data": "1963-06-19", - "valid": true - }, - { - "description": "an invalid date string", - "data": "06/19/1963", - "valid": false - } - ] - }, - { - "description": "validation of time strings", - "schema": {"format": "time"}, - "tests": [ - { - "description": "a valid time string", - "data": "08:30:06", - "valid": true - }, - { - "description": "an invalid time string", - "data": "8:30 AM", - "valid": false - } - ] - }, - { - "description": "validation of URIs", - "schema": {"format": "uri"}, - "tests": [ - { - "description": "a valid URI", - "data": "http://foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "an invalid protocol-relative URI Reference", - "data": "//foo.bar/?baz=qux#quux", - "valid": false - }, - { - "description": "an invalid URI", - "data": "\\\\WINDOWS\\fileshare", - "valid": false - }, - { - "description": "an invalid URI though valid URI reference", - "data": "abc", - "valid": false - } - ] - }, - { - "description": "validation of e-mail addresses", - "schema": {"format": "email"}, - "tests": [ - { - "description": "a valid e-mail address", - "data": "joe.bloggs@example.com", - "valid": true - }, - { - "description": "an invalid e-mail address", - "data": "2962", - "valid": false - } - ] - }, - { - "description": "validation of IP addresses", - "schema": {"format": "ip-address"}, - "tests": [ - { - "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": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, - "tests": [ - { - "description": "a valid IPv6 address", - "data": "::1", - "valid": true - }, - { - "description": "an IPv6 address with out-of-range values", - "data": "12345::", - "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": "validation of host names", - "schema": {"format": "host-name"}, - "tests": [ - { - "description": "a valid host name", - "data": "www.example.com", - "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": "validation of CSS colors", - "schema": {"format": "color"}, - "tests": [ - { - "description": "a valid CSS color name", - "data": "fuchsia", - "valid": true - }, - { - "description": "a valid six-digit CSS color code", - "data": "#CC8899", - "valid": true - }, - { - "description": "a valid three-digit CSS color code", - "data": "#C89", - "valid": true - }, - { - "description": "an invalid CSS color code", - "data": "#00332520", - "valid": false - }, - { - "description": "an invalid CSS color name", - "data": "puce", - "valid": false - }, - { - "description": "a CSS color name containing invalid characters", - "data": "light_grayish_red-violet", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/jsregex.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/jsregex.json deleted file mode 100644 index 03fe97724c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/jsregex.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "description": "ECMA 262 regex dialect recognition", - "schema": { "format": "regex" }, - "tests": [ - { - "description": "[^] is a valid regex", - "data": "[^]", - "valid": true - }, - { - "description": "ECMA 262 has no support for lookbehind", - "data": "(?<=foo)bar", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/zeroTerminatedFloats.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/optional/zeroTerminatedFloats.json deleted file mode 100644 index 9b50ea2776..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/pattern.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/pattern.json deleted file mode 100644 index 25e7299731..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/pattern.json +++ /dev/null @@ -1,34 +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 non-strings", - "data": true, - "valid": true - } - ] - }, - { - "description": "pattern is not anchored", - "schema": {"pattern": "a+"}, - "tests": [ - { - "description": "matches a substring", - "data": "xxaayy", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/patternProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/patternProperties.json deleted file mode 100644 index 2ca9aaebdd..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/patternProperties.json +++ /dev/null @@ -1,115 +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 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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/properties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/properties.json deleted file mode 100644 index a830c67e7b..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/properties.json +++ /dev/null @@ -1,97 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/ref.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/ref.json deleted file mode 100644 index 31414ad6ba..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/ref.json +++ /dev/null @@ -1,192 +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": { - "tilda~field": {"type": "integer"}, - "slash/field": {"type": "integer"}, - "percent%field": {"type": "integer"}, - "properties": { - "tilda": {"$ref": "#/tilda~0field"}, - "slash": {"$ref": "#/slash~1field"}, - "percent": {"$ref": "#/percent%25field"} - } - }, - "tests": [ - { - "description": "slash invalid", - "data": {"slash": "aoeu"}, - "valid": false - }, - { - "description": "tilda invalid", - "data": {"tilda": "aoeu"}, - "valid": false - }, - { - "description": "percent invalid", - "data": {"percent": "aoeu"}, - "valid": false - }, - { - "description": "slash valid", - "data": {"slash": 123}, - "valid": true - }, - { - "description": "tilda valid", - "data": {"tilda": 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"} - }, - "$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": "remote ref valid", - "data": { "foo": [] }, - "valid": true - }, - { - "description": "remote ref valid, maxItems ignored", - "data": { "foo": [ 1, 2, 3] }, - "valid": true - }, - { - "description": "ref invalid", - "data": { "foo": "string" }, - "valid": false - } - ] - }, - { - "description": "remote ref, containing refs itself", - "schema": {"$ref": "http://json-schema.org/draft-03/schema#"}, - "tests": [ - { - "description": "remote ref valid", - "data": {"items": {"type": "integer"}}, - "valid": true - }, - { - "description": "remote ref invalid", - "data": {"items": {"type": 1}}, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/refRemote.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/refRemote.json deleted file mode 100644 index 4ca804732c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/refRemote.json +++ /dev/null @@ -1,74 +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#/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#/refToInteger" - }, - "tests": [ - { - "description": "ref within ref valid", - "data": 1, - "valid": true - }, - { - "description": "ref within ref invalid", - "data": "a", - "valid": false - } - ] - }, - { - "description": "change resolution scope", - "schema": { - "id": "http://localhost:1234/", - "items": { - "id": "folder/", - "items": {"$ref": "folderInteger.json"} - } - }, - "tests": [ - { - "description": "changed scope ref valid", - "data": [[1]], - "valid": true - }, - { - "description": "changed scope ref invalid", - "data": [["a"]], - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/required.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/required.json deleted file mode 100644 index aaaf024273..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/required.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "description": "required validation", - "schema": { - "properties": { - "foo": {"required" : true}, - "bar": {} - } - }, - "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": "required default validation", - "schema": { - "properties": { - "foo": {} - } - }, - "tests": [ - { - "description": "not required by default", - "data": {}, - "valid": true - } - ] - }, - { - "description": "required explicitly false validation", - "schema": { - "properties": { - "foo": {"required": false} - } - }, - "tests": [ - { - "description": "not required if required is false", - "data": {}, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/type.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/type.json deleted file mode 100644 index 49c9b40a99..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/type.json +++ /dev/null @@ -1,489 +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 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 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": "a float is not a boolean", - "data": 1.1, - "valid": false - }, - { - "description": "a string is not a boolean", - "data": "foo", - "valid": false - }, - { - "description": "an object is not a boolean", - "data": {}, - "valid": false - }, - { - "description": "an array is not a boolean", - "data": [], - "valid": false - }, - { - "description": "a boolean is a boolean", - "data": true, - "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": "a string is not null", - "data": "foo", - "valid": false - }, - { - "description": "an object is not null", - "data": {}, - "valid": false - }, - { - "description": "an array is not null", - "data": [], - "valid": false - }, - { - "description": "a boolean is not null", - "data": true, - "valid": false - }, - { - "description": "null is null", - "data": null, - "valid": true - } - ] - }, - { - "description": "any type matches any type", - "schema": {"type": "any"}, - "tests": [ - { - "description": "any type includes integers", - "data": 1, - "valid": true - }, - { - "description": "any type includes float", - "data": 1.1, - "valid": true - }, - { - "description": "any type includes string", - "data": "foo", - "valid": true - }, - { - "description": "any type includes object", - "data": {}, - "valid": true - }, - { - "description": "any type includes array", - "data": [], - "valid": true - }, - { - "description": "any type includes boolean", - "data": true, - "valid": true - }, - { - "description": "any type includes 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": "types can include schemas", - "schema": { - "type": [ - "array", - {"type": "object"} - ] - }, - "tests": [ - { - "description": "an integer is invalid", - "data": 1, - "valid": false - }, - { - "description": "a string is invalid", - "data": "foo", - "valid": false - }, - { - "description": "a float is invalid", - "data": 1.1, - "valid": false - }, - { - "description": "an object is valid", - "data": {}, - "valid": true - }, - { - "description": "an array is valid", - "data": [], - "valid": true - }, - { - "description": "a boolean is invalid", - "data": true, - "valid": false - }, - { - "description": "null is invalid", - "data": null, - "valid": false - } - ] - }, - { - "description": - "when types includes a schema it should fully validate the schema", - "schema": { - "type": [ - "integer", - { - "properties": { - "foo": {"type": "null"} - } - } - ] - }, - "tests": [ - { - "description": "an integer is valid", - "data": 1, - "valid": true - }, - { - "description": "an object is valid only if it is fully valid", - "data": {"foo": null}, - "valid": true - }, - { - "description": "an object is invalid otherwise", - "data": {"foo": "bar"}, - "valid": false - } - ] - }, - { - "description": "types from separate schemas are merged", - "schema": { - "type": [ - {"type": ["string"]}, - {"type": ["array", "null"]} - ] - }, - "tests": [ - { - "description": "an integer is invalid", - "data": 1, - "valid": false - }, - { - "description": "a string is valid", - "data": "foo", - "valid": true - }, - { - "description": "an array is valid", - "data": [1, 2, 3], - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/uniqueItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/uniqueItems.json deleted file mode 100644 index c1f4ab99c9..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft3/uniqueItems.json +++ /dev/null @@ -1,79 +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": "numbers are unique if mathematically unequal", - "data": [1.0, 1.00, 1], - "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": "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": "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 invalid", - "data": [{}, [1], true, null, {}, 1], - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/additionalItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/additionalItems.json deleted file mode 100644 index abecc578be..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/additionalItems.json +++ /dev/null @@ -1,87 +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": "items is schema, no additionalItems", - "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", - "schema": { - "items": [{}, {}, {}], - "additionalItems": false - }, - "tests": [ - { - "description": "fewer number of items present", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/additionalProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/additionalProperties.json deleted file mode 100644 index ffeac6b381..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/additionalProperties.json +++ /dev/null @@ -1,133 +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 allows a schema which should validate", - "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 should not look in applicators", - "schema": { - "allOf": [ - {"properties": {"foo": {}}} - ], - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "properties defined in allOf are not allowed", - "data": {"foo": 1, "bar": true}, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/allOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/allOf.json deleted file mode 100644 index ce9fdd466c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/allOf.json +++ /dev/null @@ -1,185 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/anyOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/anyOf.json deleted file mode 100644 index 09cc3c2f64..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/default.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/default.json deleted file mode 100644 index 17629779fb..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/default.json +++ /dev/null @@ -1,49 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/definitions.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/definitions.json deleted file mode 100644 index cf935a3215..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/definitions.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "description": "valid definition", - "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": {"$ref": "http://json-schema.org/draft-04/schema#"}, - "tests": [ - { - "description": "invalid definition schema", - "data": { - "definitions": { - "foo": {"type": 1} - } - }, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/dependencies.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/dependencies.json deleted file mode 100644 index 51eeddf32e..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/dependencies.json +++ /dev/null @@ -1,194 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/enum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/enum.json deleted file mode 100644 index 32d79026e1..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/enum.json +++ /dev/null @@ -1,179 +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": "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": "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 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 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 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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/items.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/items.json deleted file mode 100644 index 7bf9f02ba1..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/items.json +++ /dev/null @@ -1,195 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxItems.json deleted file mode 100644 index 3b53a6b371..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxLength.json deleted file mode 100644 index 811d35b253..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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 supplementary Unicode code points is long enough", - "data": "\uD83D\uDCA9\uD83D\uDCA9", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxProperties.json deleted file mode 100644 index 513731e4c8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maxProperties.json +++ /dev/null @@ -1,38 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maximum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maximum.json deleted file mode 100644 index 02581f62a2..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/maximum.json +++ /dev/null @@ -1,73 +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 (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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minItems.json deleted file mode 100644 index ed5118815e..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minLength.json deleted file mode 100644 index 3f09158dee..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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 supplementary Unicode code point is not long enough", - "data": "\uD83D\uDCA9", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minProperties.json deleted file mode 100644 index 49a0726e01..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minimum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minimum.json deleted file mode 100644 index 6becf2a881..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/minimum.json +++ /dev/null @@ -1,104 +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": "below the minimum is invalid", - "data": -3, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/multipleOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/multipleOf.json deleted file mode 100644 index ca3b761805..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/multipleOf.json +++ /dev/null @@ -1,60 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/not.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/not.json deleted file mode 100644 index cbb7f46bf8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/not.json +++ /dev/null @@ -1,96 +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 - } - ] - } - -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/oneOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/oneOf.json deleted file mode 100644 index 9dfffe13b6..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/oneOf.json +++ /dev/null @@ -1,162 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/bignum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/bignum.json deleted file mode 100644 index ccc7c17fe8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/bignum.json +++ /dev/null @@ -1,107 +0,0 @@ -[ - { - "description": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a 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": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a negative bignum is an integer", - "data": -12345678910111213141516171819202122232425262728293031, - "valid": true - } - ] - }, - { - "description": "number", - "schema": {"type": "number"}, - "tests": [ - { - "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": "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": "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/ecmascript-regex.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/ecmascript-regex.json deleted file mode 100644 index 08dc9360b8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/ecmascript-regex.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "description": "ECMA 262 regex non-compliance", - "schema": { "format": "regex" }, - "tests": [ - { - "description": "ECMA 262 has no support for \\Z anchor from .NET", - "data": "^\\S(|(.|\\n)*\\S)\\Z", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/format.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/format.json deleted file mode 100644 index 4bf4ea8e1f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/format.json +++ /dev/null @@ -1,253 +0,0 @@ -[ - { - "description": "validation of date-time strings", - "schema": {"format": "date-time"}, - "tests": [ - { - "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 invalid day in date-time string", - "data": "1990-02-31T15:59:60.123-08:00", - "valid": false - }, - { - "description": "an invalid offset in date-time string", - "data": "1990-12-31T15:59:60-24:00", - "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": "validation of URIs", - "schema": {"format": "uri"}, - "tests": [ - { - "description": "a valid URL with anchor tag", - "data": "http://foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "a valid URL with anchor tag and parantheses", - "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": "validation of e-mail addresses", - "schema": {"format": "email"}, - "tests": [ - { - "description": "a valid e-mail address", - "data": "joe.bloggs@example.com", - "valid": true - }, - { - "description": "an invalid e-mail address", - "data": "2962", - "valid": false - } - ] - }, - { - "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, - "tests": [ - { - "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": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, - "tests": [ - { - "description": "a valid IPv6 address", - "data": "::1", - "valid": true - }, - { - "description": "an IPv6 address with out-of-range values", - "data": "12345::", - "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": "validation of host names", - "schema": {"format": "hostname"}, - "tests": [ - { - "description": "a valid host name", - "data": "www.example.com", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/zeroTerminatedFloats.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/optional/zeroTerminatedFloats.json deleted file mode 100644 index 9b50ea2776..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/pattern.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/pattern.json deleted file mode 100644 index 25e7299731..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/pattern.json +++ /dev/null @@ -1,34 +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 non-strings", - "data": true, - "valid": true - } - ] - }, - { - "description": "pattern is not anchored", - "schema": {"pattern": "a+"}, - "tests": [ - { - "description": "matches a substring", - "data": "xxaayy", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/patternProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/patternProperties.json deleted file mode 100644 index 5f741dfca6..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/patternProperties.json +++ /dev/null @@ -1,120 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/properties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/properties.json deleted file mode 100644 index 688527bc66..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/properties.json +++ /dev/null @@ -1,136 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/ref.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/ref.json deleted file mode 100644 index 51e750fb6f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/ref.json +++ /dev/null @@ -1,411 +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": { - "tilda~field": {"type": "integer"}, - "slash/field": {"type": "integer"}, - "percent%field": {"type": "integer"}, - "properties": { - "tilda": {"$ref": "#/tilda~0field"}, - "slash": {"$ref": "#/slash~1field"}, - "percent": {"$ref": "#/percent%25field"} - } - }, - "tests": [ - { - "description": "slash invalid", - "data": {"slash": "aoeu"}, - "valid": false - }, - { - "description": "tilda invalid", - "data": {"tilda": "aoeu"}, - "valid": false - }, - { - "description": "percent invalid", - "data": {"percent": "aoeu"}, - "valid": false - }, - { - "description": "slash valid", - "data": {"slash": 123}, - "valid": true - }, - { - "description": "tilda valid", - "data": {"tilda": 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"} - }, - "$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": "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": "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 absolute URI", - "schema": { - "allOf": [{ - "$ref": "http://localhost:1234/bar#foo" - }], - "definitions": { - "A": { - "id": "http://localhost:1234/bar#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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/refRemote.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/refRemote.json deleted file mode 100644 index 8611fadc01..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/refRemote.json +++ /dev/null @@ -1,171 +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#/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#/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": "folder/", - "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": "folder/", - "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": "folder/", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/required.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/required.json deleted file mode 100644 index 9b05318f7c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/required.json +++ /dev/null @@ -1,89 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/type.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/type.json deleted file mode 100644 index ea33b1821f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/type.json +++ /dev/null @@ -1,464 +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 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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/uniqueItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/uniqueItems.json deleted file mode 100644 index 8885ed006f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft4/uniqueItems.json +++ /dev/null @@ -1,89 +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": "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 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": "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": "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 invalid", - "data": [{}, [1], true, null, {}, 1], - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/additionalItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/additionalItems.json deleted file mode 100644 index abecc578be..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/additionalItems.json +++ /dev/null @@ -1,87 +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": "items is schema, no additionalItems", - "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", - "schema": { - "items": [{}, {}, {}], - "additionalItems": false - }, - "tests": [ - { - "description": "fewer number of items present", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/additionalProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/additionalProperties.json deleted file mode 100644 index ffeac6b381..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/additionalProperties.json +++ /dev/null @@ -1,133 +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 allows a schema which should validate", - "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 should not look in applicators", - "schema": { - "allOf": [ - {"properties": {"foo": {}}} - ], - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "properties defined in allOf are not allowed", - "data": {"foo": 1, "bar": true}, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/allOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/allOf.json deleted file mode 100644 index eb612091aa..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/allOf.json +++ /dev/null @@ -1,218 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/anyOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/anyOf.json deleted file mode 100644 index ab5eb386b4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/boolean_schema.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/boolean_schema.json deleted file mode 100644 index 6d40f23f26..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/const.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/const.json deleted file mode 100644 index c089625dc4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/const.json +++ /dev/null @@ -1,170 +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 0 does not match false", - "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": "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/contains.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/contains.json deleted file mode 100644 index 67ecbd991a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/contains.json +++ /dev/null @@ -1,100 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/default.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/default.json deleted file mode 100644 index 17629779fb..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/default.json +++ /dev/null @@ -1,49 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/definitions.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/definitions.json deleted file mode 100644 index 7f3b8997d5..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/definitions.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "description": "valid definition", - "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": {"$ref": "http://json-schema.org/draft-06/schema#"}, - "tests": [ - { - "description": "invalid definition schema", - "data": { - "definitions": { - "foo": {"type": 1} - } - }, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/dependencies.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/dependencies.json deleted file mode 100644 index 8dd78aa5d8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/dependencies.json +++ /dev/null @@ -1,268 +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": "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": "empty array of dependencies", - "schema": { - "dependencies": { - "foo": [] - } - }, - "tests": [ - { - "description": "object with property is valid", - "data": { "foo": 1 }, - "valid": true - }, - { - "description": "empty object is valid", - "data": {}, - "valid": true - }, - { - "description": "non-object is valid", - "data": 1, - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/enum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/enum.json deleted file mode 100644 index 32d79026e1..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/enum.json +++ /dev/null @@ -1,179 +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": "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": "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 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 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 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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/exclusiveMaximum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/exclusiveMaximum.json deleted file mode 100644 index dc3cd709d3..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/exclusiveMinimum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/exclusiveMinimum.json deleted file mode 100644 index b38d7ecec6..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/items.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/items.json deleted file mode 100644 index 67f11840a2..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/items.json +++ /dev/null @@ -1,250 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxItems.json deleted file mode 100644 index 3b53a6b371..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxLength.json deleted file mode 100644 index 811d35b253..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/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 supplementary Unicode code points is long enough", - "data": "\uD83D\uDCA9\uD83D\uDCA9", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxProperties.json deleted file mode 100644 index 513731e4c8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maxProperties.json +++ /dev/null @@ -1,38 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maximum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maximum.json deleted file mode 100644 index 8150984ee5..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/maximum.json +++ /dev/null @@ -1,28 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minItems.json deleted file mode 100644 index ed5118815e..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minLength.json deleted file mode 100644 index 3f09158dee..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/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 supplementary Unicode code point is not long enough", - "data": "\uD83D\uDCA9", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minProperties.json deleted file mode 100644 index 49a0726e01..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minimum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minimum.json deleted file mode 100644 index 2a9c42b3c4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/minimum.json +++ /dev/null @@ -1,59 +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": "below the minimum is invalid", - "data": -3, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/multipleOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/multipleOf.json deleted file mode 100644 index ca3b761805..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/multipleOf.json +++ /dev/null @@ -1,60 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/not.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/not.json deleted file mode 100644 index 98de0eda8d..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/not.json +++ /dev/null @@ -1,117 +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": "not with boolean schema true", - "schema": {"not": true}, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "not with boolean schema false", - "schema": {"not": false}, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/oneOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/oneOf.json deleted file mode 100644 index 57640b7afb..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/oneOf.json +++ /dev/null @@ -1,206 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/bignum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/bignum.json deleted file mode 100644 index fac275e21f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/bignum.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "description": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a 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": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a negative bignum is an integer", - "data": -12345678910111213141516171819202122232425262728293031, - "valid": true - } - ] - }, - { - "description": "number", - "schema": {"type": "number"}, - "tests": [ - { - "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": "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": "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/ecmascript-regex.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/ecmascript-regex.json deleted file mode 100644 index 08dc9360b8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/ecmascript-regex.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "description": "ECMA 262 regex non-compliance", - "schema": { "format": "regex" }, - "tests": [ - { - "description": "ECMA 262 has no support for \\Z anchor from .NET", - "data": "^\\S(|(.|\\n)*\\S)\\Z", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/format.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/format.json deleted file mode 100644 index 74743ff616..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/format.json +++ /dev/null @@ -1,493 +0,0 @@ -[ - { - "description": "validation of date-time strings", - "schema": {"format": "date-time"}, - "tests": [ - { - "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 invalid day in date-time string", - "data": "1990-02-31T15:59:60.123-08:00", - "valid": false - }, - { - "description": "an invalid offset in date-time string", - "data": "1990-12-31T15:59:60-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": "validation of URIs", - "schema": {"format": "uri"}, - "tests": [ - { - "description": "a valid URL with anchor tag", - "data": "http://foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "a valid URL with anchor tag and parantheses", - "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": "validation of URI References", - "schema": {"format": "uri-reference"}, - "tests": [ - { - "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 - } - ] - }, - { - "description": "format: uri-template", - "schema": { - "format": "uri-template" - }, - "tests": [ - { - "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 - } - ] - }, - { - "description": "validation of e-mail addresses", - "schema": {"format": "email"}, - "tests": [ - { - "description": "a valid e-mail address", - "data": "joe.bloggs@example.com", - "valid": true - }, - { - "description": "an invalid e-mail address", - "data": "2962", - "valid": false - } - ] - }, - { - "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, - "tests": [ - { - "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": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, - "tests": [ - { - "description": "a valid IPv6 address", - "data": "::1", - "valid": true - }, - { - "description": "an IPv6 address with out-of-range values", - "data": "12345::", - "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": "validation of host names", - "schema": {"format": "hostname"}, - "tests": [ - { - "description": "a valid host name", - "data": "www.example.com", - "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": "validation of JSON-pointers (JSON String Representation)", - "schema": {"format": "json-pointer"}, - "tests": [ - { - "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/zeroTerminatedFloats.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/optional/zeroTerminatedFloats.json deleted file mode 100644 index 1bcdf96036..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/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 without fractional part is an integer", - "data": 1.0, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/pattern.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/pattern.json deleted file mode 100644 index 25e7299731..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/pattern.json +++ /dev/null @@ -1,34 +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 non-strings", - "data": true, - "valid": true - } - ] - }, - { - "description": "pattern is not anchored", - "schema": {"pattern": "a+"}, - "tests": [ - { - "description": "matches a substring", - "data": "xxaayy", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/patternProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/patternProperties.json deleted file mode 100644 index 1d04a1675c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/patternProperties.json +++ /dev/null @@ -1,151 +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": "empty object is valid", - "data": {}, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/properties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/properties.json deleted file mode 100644 index b86c181982..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/properties.json +++ /dev/null @@ -1,167 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/propertyNames.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/propertyNames.json deleted file mode 100644 index 8423690d90..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/propertyNames.json +++ /dev/null @@ -1,78 +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 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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/ref.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/ref.json deleted file mode 100644 index 53f3a9e9d4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/ref.json +++ /dev/null @@ -1,443 +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": { - "tilda~field": {"type": "integer"}, - "slash/field": {"type": "integer"}, - "percent%field": {"type": "integer"}, - "properties": { - "tilda": {"$ref": "#/tilda~0field"}, - "slash": {"$ref": "#/slash~1field"}, - "percent": {"$ref": "#/percent%25field"} - } - }, - "tests": [ - { - "description": "slash invalid", - "data": {"slash": "aoeu"}, - "valid": false - }, - { - "description": "tilda invalid", - "data": {"tilda": "aoeu"}, - "valid": false - }, - { - "description": "percent invalid", - "data": {"percent": "aoeu"}, - "valid": false - }, - { - "description": "slash valid", - "data": {"slash": 123}, - "valid": true - }, - { - "description": "tilda valid", - "data": {"tilda": 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"} - }, - "$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": "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": "$ref to boolean schema true", - "schema": { - "$ref": "#/definitions/bool", - "definitions": { - "bool": true - } - }, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "$ref to boolean schema false", - "schema": { - "$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": "Location-independent identifier with absolute URI", - "schema": { - "allOf": [{ - "$ref": "http://localhost:1234/bar#foo" - }], - "definitions": { - "A": { - "$id": "http://localhost:1234/bar#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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/refRemote.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/refRemote.json deleted file mode 100644 index 819d32678a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/refRemote.json +++ /dev/null @@ -1,171 +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#/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#/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": "folder/", - "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": "folder/", - "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": "folder/", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/required.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/required.json deleted file mode 100644 index abf18f3459..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/required.json +++ /dev/null @@ -1,105 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/type.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/type.json deleted file mode 100644 index ea33b1821f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/type.json +++ /dev/null @@ -1,464 +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 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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/uniqueItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/uniqueItems.json deleted file mode 100644 index 8885ed006f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft6/uniqueItems.json +++ /dev/null @@ -1,89 +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": "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 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": "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": "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 invalid", - "data": [{}, [1], true, null, {}, 1], - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/additionalItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/additionalItems.json deleted file mode 100644 index abecc578be..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/additionalItems.json +++ /dev/null @@ -1,87 +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": "items is schema, no additionalItems", - "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", - "schema": { - "items": [{}, {}, {}], - "additionalItems": false - }, - "tests": [ - { - "description": "fewer number of items present", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/additionalProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/additionalProperties.json deleted file mode 100644 index ffeac6b381..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/additionalProperties.json +++ /dev/null @@ -1,133 +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 allows a schema which should validate", - "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 should not look in applicators", - "schema": { - "allOf": [ - {"properties": {"foo": {}}} - ], - "additionalProperties": {"type": "boolean"} - }, - "tests": [ - { - "description": "properties defined in allOf are not allowed", - "data": {"foo": 1, "bar": true}, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/allOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/allOf.json deleted file mode 100644 index eb612091aa..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/allOf.json +++ /dev/null @@ -1,218 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/anyOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/anyOf.json deleted file mode 100644 index ab5eb386b4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/boolean_schema.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/boolean_schema.json deleted file mode 100644 index 6d40f23f26..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/const.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/const.json deleted file mode 100644 index c089625dc4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/const.json +++ /dev/null @@ -1,170 +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 0 does not match false", - "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": "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/contains.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/contains.json deleted file mode 100644 index 67ecbd991a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/contains.json +++ /dev/null @@ -1,100 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/default.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/default.json deleted file mode 100644 index 17629779fb..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/default.json +++ /dev/null @@ -1,49 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/definitions.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/definitions.json deleted file mode 100644 index 436040650a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/definitions.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "description": "valid definition", - "schema": {"$ref": "http://json-schema.org/draft-07/schema#"}, - "tests": [ - { - "description": "valid definition schema", - "data": { - "definitions": { - "foo": {"type": "integer"} - } - }, - "valid": true - } - ] - }, - { - "description": "invalid definition", - "schema": {"$ref": "http://json-schema.org/draft-07/schema#"}, - "tests": [ - { - "description": "invalid definition schema", - "data": { - "definitions": { - "foo": {"type": 1} - } - }, - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/dependencies.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/dependencies.json deleted file mode 100644 index 8dd78aa5d8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/dependencies.json +++ /dev/null @@ -1,268 +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": "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": "empty array of dependencies", - "schema": { - "dependencies": { - "foo": [] - } - }, - "tests": [ - { - "description": "object with property is valid", - "data": { "foo": 1 }, - "valid": true - }, - { - "description": "empty object is valid", - "data": {}, - "valid": true - }, - { - "description": "non-object is valid", - "data": 1, - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/enum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/enum.json deleted file mode 100644 index 32d79026e1..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/enum.json +++ /dev/null @@ -1,179 +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": "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": "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 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 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 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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/exclusiveMaximum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/exclusiveMaximum.json deleted file mode 100644 index dc3cd709d3..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/exclusiveMinimum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/exclusiveMinimum.json deleted file mode 100644 index b38d7ecec6..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/if-then-else.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/if-then-else.json deleted file mode 100644 index be7328163d..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/if-then-else.json +++ /dev/null @@ -1,188 +0,0 @@ -[ - { - "description": "ignore if without then or else", - "schema": { - "if": { - "const": 0 - } - }, - "tests": [ - { - "description": "valid when valid against lone if", - "data": 0, - "valid": true - }, - { - "description": "valid when invalid against lone if", - "data": "hello", - "valid": true - } - ] - }, - { - "description": "ignore then without if", - "schema": { - "then": { - "const": 0 - } - }, - "tests": [ - { - "description": "valid when valid against lone then", - "data": 0, - "valid": true - }, - { - "description": "valid when invalid against lone then", - "data": "hello", - "valid": true - } - ] - }, - { - "description": "ignore else without if", - "schema": { - "else": { - "const": 0 - } - }, - "tests": [ - { - "description": "valid when valid against lone else", - "data": 0, - "valid": true - }, - { - "description": "valid when invalid against lone else", - "data": "hello", - "valid": true - } - ] - }, - { - "description": "if and then without else", - "schema": { - "if": { - "exclusiveMaximum": 0 - }, - "then": { - "minimum": -10 - } - }, - "tests": [ - { - "description": "valid through then", - "data": -1, - "valid": true - }, - { - "description": "invalid through then", - "data": -100, - "valid": false - }, - { - "description": "valid when if test fails", - "data": 3, - "valid": true - } - ] - }, - { - "description": "if and else without then", - "schema": { - "if": { - "exclusiveMaximum": 0 - }, - "else": { - "multipleOf": 2 - } - }, - "tests": [ - { - "description": "valid when if test passes", - "data": -1, - "valid": true - }, - { - "description": "valid through else", - "data": 4, - "valid": true - }, - { - "description": "invalid through else", - "data": 3, - "valid": false - } - ] - }, - { - "description": "validate against correct branch, then vs else", - "schema": { - "if": { - "exclusiveMaximum": 0 - }, - "then": { - "minimum": -10 - }, - "else": { - "multipleOf": 2 - } - }, - "tests": [ - { - "description": "valid through then", - "data": -1, - "valid": true - }, - { - "description": "invalid through then", - "data": -100, - "valid": false - }, - { - "description": "valid through else", - "data": 4, - "valid": true - }, - { - "description": "invalid through else", - "data": 3, - "valid": false - } - ] - }, - { - "description": "non-interference across combined schemas", - "schema": { - "allOf": [ - { - "if": { - "exclusiveMaximum": 0 - } - }, - { - "then": { - "minimum": -10 - } - }, - { - "else": { - "multipleOf": 2 - } - } - ] - }, - "tests": [ - { - "description": "valid, but would have been invalid through then", - "data": -100, - "valid": true - }, - { - "description": "valid, but would have been invalid through else", - "data": 3, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/items.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/items.json deleted file mode 100644 index 67f11840a2..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/items.json +++ /dev/null @@ -1,250 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxItems.json deleted file mode 100644 index 3b53a6b371..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxLength.json deleted file mode 100644 index 811d35b253..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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 supplementary Unicode code points is long enough", - "data": "\uD83D\uDCA9\uD83D\uDCA9", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxProperties.json deleted file mode 100644 index 513731e4c8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maxProperties.json +++ /dev/null @@ -1,38 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maximum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maximum.json deleted file mode 100644 index 8150984ee5..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/maximum.json +++ /dev/null @@ -1,28 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minItems.json deleted file mode 100644 index ed5118815e..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minLength.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minLength.json deleted file mode 100644 index 3f09158dee..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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 supplementary Unicode code point is not long enough", - "data": "\uD83D\uDCA9", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minProperties.json deleted file mode 100644 index 49a0726e01..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minimum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minimum.json deleted file mode 100644 index 2a9c42b3c4..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/minimum.json +++ /dev/null @@ -1,59 +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": "below the minimum is invalid", - "data": -3, - "valid": false - }, - { - "description": "ignores non-numbers", - "data": "x", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/multipleOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/multipleOf.json deleted file mode 100644 index ca3b761805..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/multipleOf.json +++ /dev/null @@ -1,60 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/not.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/not.json deleted file mode 100644 index 98de0eda8d..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/not.json +++ /dev/null @@ -1,117 +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": "not with boolean schema true", - "schema": {"not": true}, - "tests": [ - { - "description": "any value is invalid", - "data": "foo", - "valid": false - } - ] - }, - { - "description": "not with boolean schema false", - "schema": {"not": false}, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/oneOf.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/oneOf.json deleted file mode 100644 index 57640b7afb..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/oneOf.json +++ /dev/null @@ -1,206 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/bignum.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/bignum.json deleted file mode 100644 index fac275e21f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/bignum.json +++ /dev/null @@ -1,105 +0,0 @@ -[ - { - "description": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a 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": "integer", - "schema": {"type": "integer"}, - "tests": [ - { - "description": "a negative bignum is an integer", - "data": -12345678910111213141516171819202122232425262728293031, - "valid": true - } - ] - }, - { - "description": "number", - "schema": {"type": "number"}, - "tests": [ - { - "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": "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": "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/content.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/content.json deleted file mode 100644 index 3f5a7430b2..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/content.json +++ /dev/null @@ -1,77 +0,0 @@ -[ - { - "description": "validation of string-encoded content based on media type", - "schema": { - "contentMediaType": "application/json" - }, - "tests": [ - { - "description": "a valid JSON document", - "data": "{\"foo\": \"bar\"}", - "valid": true - }, - { - "description": "an invalid JSON document", - "data": "{:}", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 100, - "valid": true - } - ] - }, - { - "description": "validation of binary string-encoding", - "schema": { - "contentEncoding": "base64" - }, - "tests": [ - { - "description": "a valid base64 string", - "data": "eyJmb28iOiAiYmFyIn0K", - "valid": true - }, - { - "description": "an invalid base64 string (% is not a valid character)", - "data": "eyJmb28iOi%iYmFyIn0K", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 100, - "valid": true - } - ] - }, - { - "description": "validation of binary-encoded media type documents", - "schema": { - "contentMediaType": "application/json", - "contentEncoding": "base64" - }, - "tests": [ - { - "description": "a valid base64-encoded JSON document", - "data": "eyJmb28iOiAiYmFyIn0K", - "valid": true - }, - { - "description": "a validly-encoded invalid JSON document", - "data": "ezp9Cg==", - "valid": false - }, - { - "description": "an invalid base64 string that is valid JSON", - "data": "{}", - "valid": false - }, - { - "description": "ignores non-strings", - "data": 100, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/ecmascript-regex.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/ecmascript-regex.json deleted file mode 100644 index 08dc9360b8..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/ecmascript-regex.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "description": "ECMA 262 regex non-compliance", - "schema": { "format": "regex" }, - "tests": [ - { - "description": "ECMA 262 has no support for \\Z anchor from .NET", - "data": "^\\S(|(.|\\n)*\\S)\\Z", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/date-time.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/date-time.json deleted file mode 100644 index dfccee6e67..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/date-time.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "description": "validation of date-time strings", - "schema": {"format": "date-time"}, - "tests": [ - { - "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 invalid day in date-time string", - "data": "1990-02-31T15:59:60.123-08:00", - "valid": false - }, - { - "description": "an invalid offset in date-time string", - "data": "1990-12-31T15:59:60-24:00", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/date.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/date.json deleted file mode 100644 index cd23baae3a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/date.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "description": "validation of date strings", - "schema": {"format": "date"}, - "tests": [ - { - "description": "a valid date string", - "data": "1963-06-19", - "valid": true - }, - { - "description": "an invalid date-time string", - "data": "06/19/1963", - "valid": false - }, - { - "description": "only RFC3339 not all of ISO 8601 are valid", - "data": "2013-350", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/email.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/email.json deleted file mode 100644 index c837c84bc1..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/email.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "description": "validation of e-mail addresses", - "schema": {"format": "email"}, - "tests": [ - { - "description": "a valid e-mail address", - "data": "joe.bloggs@example.com", - "valid": true - }, - { - "description": "an invalid e-mail address", - "data": "2962", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/hostname.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/hostname.json deleted file mode 100644 index d22e57db03..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/hostname.json +++ /dev/null @@ -1,33 +0,0 @@ -[ - { - "description": "validation of host names", - "schema": {"format": "hostname"}, - "tests": [ - { - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-email.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-email.json deleted file mode 100644 index 637409ea8f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-email.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "description": "validation of an internationalized e-mail addresses", - "schema": {"format": "idn-email"}, - "tests": [ - { - "description": "a valid idn e-mail (example@example.test in Hangul)", - "data": "실례@실례.테스트", - "valid": true - }, - { - "description": "an invalid idn e-mail address", - "data": "2962", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-hostname.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-hostname.json deleted file mode 100644 index 3291820e6f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/idn-hostname.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "validation of internationalized host names", - "schema": {"format": "idn-hostname"}, - "tests": [ - { - "description": "a valid host name (example.test in Hangul)", - "data": "실례.테스트", - "valid": true - }, - { - "description": "illegal first char U+302E Hangul single dot tone mark", - "data": "〮실례.테스트", - "valid": false - }, - { - "description": "contains illegal char U+302E Hangul single dot tone mark", - "data": "실〮례.테스트", - "valid": false - }, - { - "description": "a host name with a component too long", - "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv4.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv4.json deleted file mode 100644 index 661148a74d..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv4.json +++ /dev/null @@ -1,33 +0,0 @@ -[ - { - "description": "validation of IP addresses", - "schema": {"format": "ipv4"}, - "tests": [ - { - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv6.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv6.json deleted file mode 100644 index f67559b35d..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/ipv6.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, - "tests": [ - { - "description": "a valid IPv6 address", - "data": "::1", - "valid": true - }, - { - "description": "an IPv6 address with out-of-range values", - "data": "12345::", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri-reference.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri-reference.json deleted file mode 100644 index 1fd779c23c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri-reference.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "description": "validation of IRI References", - "schema": {"format": "iri-reference"}, - "tests": [ - { - "description": "a valid IRI", - "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", - "valid": true - }, - { - "description": "a valid protocol-relative IRI Reference", - "data": "//ƒøø.ßår/?∂éœ=πîx#πîüx", - "valid": true - }, - { - "description": "a valid relative IRI Reference", - "data": "/âππ", - "valid": true - }, - { - "description": "an invalid IRI Reference", - "data": "\\\\WINDOWS\\filëßåré", - "valid": false - }, - { - "description": "a valid IRI Reference", - "data": "âππ", - "valid": true - }, - { - "description": "a valid IRI fragment", - "data": "#ƒrägmênt", - "valid": true - }, - { - "description": "an invalid IRI fragment", - "data": "#ƒräg\\mênt", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri.json deleted file mode 100644 index ed54094c01..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "description": "validation of IRIs", - "schema": {"format": "iri"}, - "tests": [ - { - "description": "a valid IRI with anchor tag", - "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx", - "valid": true - }, - { - "description": "a valid IRI with anchor tag and parantheses", - "data": "http://ƒøø.com/blah_(wîkïpédiå)_blah#ßité-1", - "valid": true - }, - { - "description": "a valid IRI with URL-encoded stuff", - "data": "http://ƒøø.ßår/?q=Test%20URL-encoded%20stuff", - "valid": true - }, - { - "description": "a valid IRI with many special characters", - "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", - "valid": true - }, - { - "description": "a valid IRI based on IPv6", - "data": "http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]", - "valid": true - }, - { - "description": "an invalid IRI based on IPv6", - "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334", - "valid": false - }, - { - "description": "an invalid relative IRI Reference", - "data": "/abc", - "valid": false - }, - { - "description": "an invalid IRI", - "data": "\\\\WINDOWS\\filëßåré", - "valid": false - }, - { - "description": "an invalid IRI though valid IRI reference", - "data": "âππ", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/json-pointer.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/json-pointer.json deleted file mode 100644 index 65c2f064f0..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/json-pointer.json +++ /dev/null @@ -1,168 +0,0 @@ -[ - { - "description": "validation of JSON-pointers (JSON String Representation)", - "schema": {"format": "json-pointer"}, - "tests": [ - { - "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/regex.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/regex.json deleted file mode 100644 index d99d021ec0..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/regex.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "description": "validation of regular expressions", - "schema": {"format": "regex"}, - "tests": [ - { - "description": "a valid regular expression", - "data": "([abc])+\\s+$", - "valid": true - }, - { - "description": "a regular expression with unclosed parens is invalid", - "data": "^(abc]", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/relative-json-pointer.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/relative-json-pointer.json deleted file mode 100644 index ceeb743a32..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/relative-json-pointer.json +++ /dev/null @@ -1,33 +0,0 @@ -[ - { - "description": "validation of Relative JSON Pointers (RJP)", - "schema": {"format": "relative-json-pointer"}, - "tests": [ - { - "description": "a valid upwards RJP", - "data": "1", - "valid": true - }, - { - "description": "a valid downwards RJP", - "data": "0/foo/bar", - "valid": true - }, - { - "description": "a valid up and then down RJP, with array index", - "data": "2/0/baz/1/zip", - "valid": true - }, - { - "description": "a valid RJP taking the member or index name", - "data": "0#", - "valid": true - }, - { - "description": "an invalid RJP that is a valid JSON Pointer", - "data": "/foo/bar", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/time.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/time.json deleted file mode 100644 index 4ec8a01a3e..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/time.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "description": "validation of time strings", - "schema": {"format": "time"}, - "tests": [ - { - "description": "a valid time string", - "data": "08:30:06.283185Z", - "valid": true - }, - { - "description": "an invalid time string", - "data": "08:30:06 PST", - "valid": false - }, - { - "description": "only RFC3339 not all of ISO 8601 are valid", - "data": "01:01:01,1111", - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri-reference.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri-reference.json deleted file mode 100644 index e4c9eef63c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri-reference.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "description": "validation of URI References", - "schema": {"format": "uri-reference"}, - "tests": [ - { - "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri-template.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri-template.json deleted file mode 100644 index d8396a5a79..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri-template.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "description": "format: uri-template", - "schema": { - "format": "uri-template" - }, - "tests": [ - { - "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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri.json deleted file mode 100644 index 25cc40c80a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri.json +++ /dev/null @@ -1,103 +0,0 @@ -[ - { - "description": "validation of URIs", - "schema": {"format": "uri"}, - "tests": [ - { - "description": "a valid URL with anchor tag", - "data": "http://foo.bar/?baz=qux#quux", - "valid": true - }, - { - "description": "a valid URL with anchor tag and parantheses", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/zeroTerminatedFloats.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/optional/zeroTerminatedFloats.json deleted file mode 100644 index 1bcdf96036..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/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 without fractional part is an integer", - "data": 1.0, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/pattern.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/pattern.json deleted file mode 100644 index 25e7299731..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/pattern.json +++ /dev/null @@ -1,34 +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 non-strings", - "data": true, - "valid": true - } - ] - }, - { - "description": "pattern is not anchored", - "schema": {"pattern": "a+"}, - "tests": [ - { - "description": "matches a substring", - "data": "xxaayy", - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/patternProperties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/patternProperties.json deleted file mode 100644 index 1d04a1675c..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/patternProperties.json +++ /dev/null @@ -1,151 +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": "empty object is valid", - "data": {}, - "valid": true - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/properties.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/properties.json deleted file mode 100644 index b86c181982..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/properties.json +++ /dev/null @@ -1,167 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/propertyNames.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/propertyNames.json deleted file mode 100644 index 8423690d90..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/propertyNames.json +++ /dev/null @@ -1,78 +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 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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/ref.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/ref.json deleted file mode 100644 index 44b8ed22f1..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/ref.json +++ /dev/null @@ -1,443 +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": { - "tilda~field": {"type": "integer"}, - "slash/field": {"type": "integer"}, - "percent%field": {"type": "integer"}, - "properties": { - "tilda": {"$ref": "#/tilda~0field"}, - "slash": {"$ref": "#/slash~1field"}, - "percent": {"$ref": "#/percent%25field"} - } - }, - "tests": [ - { - "description": "slash invalid", - "data": {"slash": "aoeu"}, - "valid": false - }, - { - "description": "tilda invalid", - "data": {"tilda": "aoeu"}, - "valid": false - }, - { - "description": "percent invalid", - "data": {"percent": "aoeu"}, - "valid": false - }, - { - "description": "slash valid", - "data": {"slash": 123}, - "valid": true - }, - { - "description": "tilda valid", - "data": {"tilda": 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"} - }, - "$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": "remote ref, containing refs itself", - "schema": {"$ref": "http://json-schema.org/draft-07/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": "$ref to boolean schema true", - "schema": { - "$ref": "#/definitions/bool", - "definitions": { - "bool": true - } - }, - "tests": [ - { - "description": "any value is valid", - "data": "foo", - "valid": true - } - ] - }, - { - "description": "$ref to boolean schema false", - "schema": { - "$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": "Location-independent identifier with absolute URI", - "schema": { - "allOf": [{ - "$ref": "http://localhost:1234/bar#foo" - }], - "definitions": { - "A": { - "$id": "http://localhost:1234/bar#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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/refRemote.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/refRemote.json deleted file mode 100644 index 819d32678a..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/refRemote.json +++ /dev/null @@ -1,171 +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#/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#/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": "folder/", - "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": "folder/", - "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": "folder/", - "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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/required.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/required.json deleted file mode 100644 index abf18f3459..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/required.json +++ /dev/null @@ -1,105 +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 - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/type.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/type.json deleted file mode 100644 index ea33b1821f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/type.json +++ /dev/null @@ -1,464 +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 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/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/uniqueItems.json b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/uniqueItems.json deleted file mode 100644 index 8885ed006f..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tests/draft7/uniqueItems.json +++ /dev/null @@ -1,89 +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": "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 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": "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": "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 invalid", - "data": [{}, [1], true, null, {}, 1], - "valid": false - } - ] - } -] diff --git a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tox.ini b/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tox.ini deleted file mode 100644 index 5301222a84..0000000000 --- a/src/Valijson/valijson/thirdparty/JSON-Schema-Test-Suite/tox.ini +++ /dev/null @@ -1,8 +0,0 @@ -[tox] -minversion = 1.6 -envlist = py27 -skipsdist = True - -[testenv] -deps = jsonschema -commands = {envpython} bin/jsonschema_suite check