From ddad44ecc9941c714abd815da4bacbf2e416dafd Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 28 Jan 2025 15:58:07 -0400 Subject: [PATCH] Revise JSON Schema public interface (#1502) Signed-off-by: Juan Cruz Viotti --- src/core/jsonschema/default_walker.cc | 2 +- .../include/sourcemeta/core/jsonschema.h | 4 +- .../sourcemeta/core/jsonschema_bundle.h | 4 +- .../sourcemeta/core/jsonschema_frame.h | 2 +- .../sourcemeta/core/jsonschema_transform.h | 2 +- .../sourcemeta/core/jsonschema_unevaluated.h | 4 +- .../sourcemeta/core/jsonschema_walker.h | 25 +- src/core/jsonschema/resolver.cc | 4 +- src/core/jsonschema/transformer.cc | 2 + .../include/sourcemeta/core/alterschema.h | 2 +- test/alterschema/alterschema_test_utils.h | 4 +- test/jsonschema/CMakeLists.txt | 1 - .../jsonschema_bundle_2019_09_test.cc | 42 +- .../jsonschema_bundle_2020_12_test.cc | 50 +- .../jsonschema_bundle_draft0_test.cc | 24 +- .../jsonschema_bundle_draft1_test.cc | 24 +- .../jsonschema_bundle_draft2_test.cc | 24 +- .../jsonschema_bundle_draft3_test.cc | 24 +- .../jsonschema_bundle_draft4_test.cc | 46 +- .../jsonschema_bundle_draft6_test.cc | 42 +- .../jsonschema_bundle_draft7_test.cc | 42 +- test/jsonschema/jsonschema_bundle_test.cc | 30 +- .../jsonschema_default_walker_2019_09_test.cc | 320 ++++++------ .../jsonschema_default_walker_2020_12_test.cc | 327 +++++++------ .../jsonschema_default_walker_draft0_test.cc | 166 +++---- .../jsonschema_default_walker_draft1_test.cc | 166 +++---- .../jsonschema_default_walker_draft2_test.cc | 171 +++---- .../jsonschema_default_walker_draft3_test.cc | 122 ++--- .../jsonschema_default_walker_draft4_test.cc | 120 ++--- .../jsonschema_default_walker_draft6_test.cc | 132 ++--- .../jsonschema_default_walker_draft7_test.cc | 173 +++---- .../jsonschema_frame_2019_09_test.cc | 70 +-- .../jsonschema_frame_2020_12_test.cc | 64 +-- .../jsonschema_frame_draft0_test.cc | 18 +- .../jsonschema_frame_draft1_test.cc | 18 +- .../jsonschema_frame_draft2_test.cc | 18 +- .../jsonschema_frame_draft3_test.cc | 20 +- .../jsonschema_frame_draft4_test.cc | 26 +- .../jsonschema_frame_draft6_test.cc | 26 +- .../jsonschema_frame_draft7_test.cc | 26 +- test/jsonschema/jsonschema_frame_test.cc | 22 +- .../jsonschema_keyword_iterator_test.cc | 28 +- test/jsonschema/jsonschema_relativize_test.cc | 22 +- .../jsonschema/jsonschema_transformer_test.cc | 92 +--- .../jsonschema_unevaluated_2019_09_test.cc | 28 +- .../jsonschema_unevaluated_2020_12_test.cc | 40 +- test/jsonschema/jsonschema_unidentify_test.cc | 75 +-- .../jsonschema/jsonschema_walker_none_test.cc | 460 ------------------ test/jsonschema/referencingsuite.cc | 2 +- 49 files changed, 1327 insertions(+), 1829 deletions(-) delete mode 100644 test/jsonschema/jsonschema_walker_none_test.cc diff --git a/src/core/jsonschema/default_walker.cc b/src/core/jsonschema/default_walker.cc index 93f282bdb..e3b9055e7 100644 --- a/src/core/jsonschema/default_walker.cc +++ b/src/core/jsonschema/default_walker.cc @@ -1,6 +1,6 @@ #include -auto sourcemeta::core::default_schema_walker( +auto sourcemeta::core::schema_official_walker( std::string_view keyword, const std::map &vocabularies) -> sourcemeta::core::SchemaWalkerResult { #define WALK(vocabulary, _keyword, strategy, ...) \ diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema.h index 3602ad666..cd54175c6 100644 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema.h +++ b/src/core/jsonschema/include/sourcemeta/core/jsonschema.h @@ -339,7 +339,7 @@ auto schema_format_compare(const JSON::String &left, const JSON::String &right) /// })JSON"); /// /// sourcemeta::core::relativize(schema, -/// sourcemeta::core::default_schema_walker, +/// sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver); /// /// const sourcemeta::core::JSON expected = @@ -375,7 +375,7 @@ auto relativize( /// })JSON"); /// /// sourcemeta::core::unidentify(schema, -/// sourcemeta::core::default_schema_walker, +/// sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver); /// /// const sourcemeta::core::JSON expected = diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_bundle.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_bundle.h index c87d45146..0003ff6f0 100644 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_bundle.h +++ b/src/core/jsonschema/include/sourcemeta/core/jsonschema_bundle.h @@ -49,7 +49,7 @@ namespace sourcemeta::core { /// })JSON"); /// /// sourcemeta::core::bundle(document, -/// sourcemeta::core::default_schema_walker, test_resolver); +/// sourcemeta::core::schema_official_walker, test_resolver); /// /// const sourcemeta::core::JSON expected = /// sourcemeta::core::parse_json(R"JSON({ @@ -106,7 +106,7 @@ auto bundle(sourcemeta::core::JSON &schema, const SchemaWalker &walker, /// /// const sourcemeta::core::JSON result = /// sourcemeta::core::bundle(document, -/// sourcemeta::core::default_schema_walker, test_resolver); +/// sourcemeta::core::schema_official_walker, test_resolver); /// /// const sourcemeta::core::JSON expected = /// sourcemeta::core::parse_json(R"JSON({ diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_frame.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_frame.h index 6fa6db1bb..98adfda7d 100644 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_frame.h +++ b/src/core/jsonschema/include/sourcemeta/core/jsonschema_frame.h @@ -46,7 +46,7 @@ namespace sourcemeta::core { /// /// sourcemeta::core::SchemaSchemaFrame frame; /// frame.analyse(document, -/// sourcemeta::core::default_schema_walker, +/// sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver); /// /// // IDs diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_transform.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_transform.h index a16df1daa..33a67d589 100644 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_transform.h +++ b/src/core/jsonschema/include/sourcemeta/core/jsonschema_transform.h @@ -163,7 +163,7 @@ class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaTransformRule { /// })JSON"); /// /// // Apply the transformation bundle to the schema -/// bundle.apply(schema, sourcemeta::core::default_schema_walker, +/// bundle.apply(schema, sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver); /// /// // `foo` keywords are gone diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_unevaluated.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_unevaluated.h index 2d287155a..674b6d978 100644 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_unevaluated.h +++ b/src/core/jsonschema/include/sourcemeta/core/jsonschema_unevaluated.h @@ -56,11 +56,11 @@ using SchemaUnevaluatedEntries = std::map; /// /// sourcemeta::core::SchemaSchemaFrame frame; /// frame.analyse(document, -/// sourcemeta::core::default_schema_walker, +/// sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver); /// const auto result{sourcemeta::core::unevaluated( /// schema, frame, -/// sourcemeta::core::default_schema_walker, +/// sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver)}; /// /// assert(result.contains("#/unevaluatedProperties")); diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_walker.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_walker.h index 666eb379c..1da28dbe7 100644 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_walker.h +++ b/src/core/jsonschema/include/sourcemeta/core/jsonschema_walker.h @@ -43,25 +43,16 @@ struct SchemaWalkerResult { /// /// For convenience, we provide the following default walkers: /// -/// - sourcemeta::core::default_schema_walker +/// - sourcemeta::core::schema_official_walker /// - sourcemeta::core::schema_walker_none using SchemaWalker = std::function &)>; -/// @ingroup jsonschema -/// A stub walker that doesn't walk -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -inline auto schema_walker_none(std::string_view, - const std::map &) - -> sourcemeta::core::SchemaWalkerResult { - return {SchemaKeywordType::Unknown, std::nullopt, {}}; -} - /// @ingroup jsonschema /// A default schema walker with support for a wide range of drafs SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto default_schema_walker(std::string_view keyword, - const std::map &vocabularies) +auto schema_official_walker(std::string_view keyword, + const std::map &vocabularies) -> sourcemeta::core::SchemaWalkerResult; /// @ingroup jsonschema @@ -105,7 +96,7 @@ struct SchemaIteratorEntry { /// /// for (const auto &entry : /// sourcemeta::core::SchemaIterator{ -/// document, sourcemeta::core::default_schema_walker, +/// document, sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver}) { /// sourcemeta::core::prettify( /// sourcemeta::core::get(document, entry.pointer), std::cout); @@ -172,7 +163,7 @@ class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaIterator { /// /// for (const auto &entry : /// sourcemeta::core::SchemaIteratorFlat{ -/// document, sourcemeta::core::default_schema_walker, +/// document, sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver}) { /// sourcemeta::core::prettify( /// sourcemeta::core::get(document, entry.pointer), std::cout); @@ -235,12 +226,12 @@ class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaIteratorFlat { /// /// assert(sourcemeta::core::schema_keyword_priority( /// "prefixItems", vocabularies, -/// sourcemeta::core::default_schema_walker) == 0); +/// sourcemeta::core::schema_official_walker) == 0); /// /// // The "items" keyword must be evaluated after the "prefixItems" keyword /// assert(sourcemeta::core::schema_keyword_priority( /// "items", vocabularies, -/// sourcemeta::core::default_schema_walker) == 1); +/// sourcemeta::core::schema_official_walker) == 1); /// ``` auto SOURCEMETA_CORE_JSONSCHEMA_EXPORT schema_keyword_priority( std::string_view keyword, const std::map &vocabularies, @@ -269,7 +260,7 @@ auto SOURCEMETA_CORE_JSONSCHEMA_EXPORT schema_keyword_priority( /// /// for (const auto &entry : /// sourcemeta::core::SchemaKeywordIterator{ -/// document, sourcemeta::core::default_schema_walker, +/// document, sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver}) { /// sourcemeta::core::stringify(entry.pointer, std::cout); /// std::cout << "\n"; diff --git a/src/core/jsonschema/resolver.cc b/src/core/jsonschema/resolver.cc index 41c641bf2..4b70602c0 100644 --- a/src/core/jsonschema/resolver.cc +++ b/src/core/jsonschema/resolver.cc @@ -22,7 +22,7 @@ auto SchemaMapResolver::add(const JSON &schema, // Registering the top-level schema is not enough. We need to check // and register every embedded schema resource too SchemaFrame frame; - frame.analyse(schema, default_schema_walker, *this, default_dialect, + frame.analyse(schema, schema_official_walker, *this, default_dialect, default_id); for (const auto &[key, entry] : frame.locations()) { @@ -150,7 +150,7 @@ auto SchemaFlatFileResolver::operator()(std::string_view identifier) const *this, result->second.default_dialect); // Because we allow re-identification, we can get into issues unless we // always try to relativize references - sourcemeta::core::relativize(schema, default_schema_walker, *this, + sourcemeta::core::relativize(schema, schema_official_walker, *this, result->second.default_dialect, result->second.original_identifier); sourcemeta::core::reidentify(schema, result->first, *this, diff --git a/src/core/jsonschema/transformer.cc b/src/core/jsonschema/transformer.cc index 72bffd12c..107bc811e 100644 --- a/src/core/jsonschema/transformer.cc +++ b/src/core/jsonschema/transformer.cc @@ -48,6 +48,8 @@ auto SchemaTransformer::apply( // (2) Transform its sub-schemas for (const auto &entry : + // TODO: Replace `SchemaIteratorFlat` with framing and then just get + // rid of the idea of flat iterators, as we don't need it anywhere else SchemaIteratorFlat{current, walker, resolver, effective_dialect}) { apply(schema, walker, resolver, pointer.concat(entry.pointer), effective_dialect); diff --git a/src/extension/alterschema/include/sourcemeta/core/alterschema.h b/src/extension/alterschema/include/sourcemeta/core/alterschema.h index f50bbcef4..09798fa9d 100644 --- a/src/extension/alterschema/include/sourcemeta/core/alterschema.h +++ b/src/extension/alterschema/include/sourcemeta/core/alterschema.h @@ -77,7 +77,7 @@ enum class AlterSchemaCategory { /// } /// })JSON"); /// -/// bundle.apply(schema, sourcemeta::core::default_schema_walker, +/// bundle.apply(schema, sourcemeta::core::schema_official_walker, /// sourcemeta::core::official_resolver); /// ``` SOURCEMETA_CORE_ALTERSCHEMA_EXPORT diff --git a/test/alterschema/alterschema_test_utils.h b/test/alterschema/alterschema_test_utils.h index 465e9cbe6..305049ba0 100644 --- a/test/alterschema/alterschema_test_utils.h +++ b/test/alterschema/alterschema_test_utils.h @@ -16,7 +16,7 @@ sourcemeta::core::AlterSchemaCategory::Redundant); \ sourcemeta::core::add(bundle, \ sourcemeta::core::AlterSchemaCategory::SyntaxSugar); \ - bundle.apply(document, sourcemeta::core::default_schema_walker, \ + bundle.apply(document, sourcemeta::core::schema_official_walker, \ sourcemeta::core::official_resolver); #define LINT_AND_FIX_FOR_ANALYSIS(document) \ @@ -31,7 +31,7 @@ sourcemeta::core::AlterSchemaCategory::Implicit); \ sourcemeta::core::add(bundle, \ sourcemeta::core::AlterSchemaCategory::Desugar); \ - bundle.apply(document, sourcemeta::core::default_schema_walker, \ + bundle.apply(document, sourcemeta::core::schema_official_walker, \ sourcemeta::core::official_resolver); #endif diff --git a/test/jsonschema/CMakeLists.txt b/test/jsonschema/CMakeLists.txt index 18315c895..988fbe080 100644 --- a/test/jsonschema/CMakeLists.txt +++ b/test/jsonschema/CMakeLists.txt @@ -79,7 +79,6 @@ sourcemeta_googletest(NAMESPACE sourcemeta PROJECT core NAME jsonschema jsonschema_default_walker_draft2_test.cc jsonschema_default_walker_draft1_test.cc jsonschema_default_walker_draft0_test.cc - jsonschema_walker_none_test.cc jsonschema_walker_test.cc jsonschema_error_test.cc jsonschema_keyword_iterator_test.cc diff --git a/test/jsonschema/jsonschema_bundle_2019_09_test.cc b/test/jsonschema/jsonschema_bundle_2019_09_test.cc index c433bec46..e8530c392 100644 --- a/test/jsonschema/jsonschema_bundle_2019_09_test.cc +++ b/test/jsonschema/jsonschema_bundle_2019_09_test.cc @@ -92,7 +92,7 @@ TEST(JSONSchema_bundle_2019_09, no_references_no_id) { "$schema": "https://json-schema.org/draft/2019-09/schema" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -108,7 +108,7 @@ TEST(JSONSchema_bundle_2019_09, const_no_references_no_id) { })JSON"); const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::default_schema_walker, test_resolver); + document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "https://json-schema.org/draft/2019-09/schema" @@ -129,7 +129,7 @@ TEST(JSONSchema_bundle_2019_09, simple_with_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -179,7 +179,7 @@ TEST(JSONSchema_bundle_2019_09, simple_without_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -226,10 +226,10 @@ TEST(JSONSchema_bundle_2019_09, schema_not_found) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaResolutionError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaResolutionError); } TEST(JSONSchema_bundle_2019_09, idempotency) { @@ -241,11 +241,11 @@ TEST(JSONSchema_bundle_2019_09, idempotency) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -292,7 +292,7 @@ TEST(JSONSchema_bundle_2019_09, pre_embedded) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -339,7 +339,7 @@ TEST(JSONSchema_bundle_2019_09, taken_definitions_entry) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -376,7 +376,7 @@ TEST(JSONSchema_bundle_2019_09, recursive) { "$ref": "https://www.sourcemeta.com/recursive" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -402,7 +402,7 @@ TEST(JSONSchema_bundle_2019_09, recursive_empty_fragment) { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -427,7 +427,7 @@ TEST(JSONSchema_bundle_2019_09, anonymous_no_dialect) { "$ref": "https://www.sourcemeta.com/anonymous" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver, "https://json-schema.org/draft/2019-09/schema"); @@ -450,7 +450,7 @@ TEST(JSONSchema_bundle_2019_09, metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -485,7 +485,7 @@ TEST(JSONSchema_bundle_2019_09, relative_base_uri_with_ref) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -508,7 +508,7 @@ TEST(JSONSchema_bundle_2019_09, hyperschema_smoke) { "$ref": "https://json-schema.org/draft/2019-09/hyper-schema" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.is_object()); @@ -523,7 +523,7 @@ TEST(JSONSchema_bundle_2019_09, hyperschema_1) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.defines("$defs")); @@ -558,7 +558,7 @@ TEST(JSONSchema_bundle_2019_09, hyperschema_2) { "https://json-schema.org/draft/2019-09/hyper-schema") .value(); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.defines("$defs")); diff --git a/test/jsonschema/jsonschema_bundle_2020_12_test.cc b/test/jsonschema/jsonschema_bundle_2020_12_test.cc index 2c0758513..a5b6a3598 100644 --- a/test/jsonschema/jsonschema_bundle_2020_12_test.cc +++ b/test/jsonschema/jsonschema_bundle_2020_12_test.cc @@ -102,7 +102,7 @@ TEST(JSONSchema_bundle_2020_12, no_references_no_id) { "$schema": "https://json-schema.org/draft/2020-12/schema" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -118,7 +118,7 @@ TEST(JSONSchema_bundle_2020_12, const_no_references_no_id) { })JSON"); const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::default_schema_walker, test_resolver); + document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "https://json-schema.org/draft/2020-12/schema" @@ -140,7 +140,7 @@ TEST(JSONSchema_bundle_2020_12, simple_with_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -197,7 +197,7 @@ TEST(JSONSchema_bundle_2020_12, simple_without_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -250,10 +250,10 @@ TEST(JSONSchema_bundle_2020_12, schema_not_found) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaResolutionError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaResolutionError); } TEST(JSONSchema_bundle_2020_12, anchor_not_found) { @@ -265,10 +265,10 @@ TEST(JSONSchema_bundle_2020_12, anchor_not_found) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaReferenceError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaReferenceError); } TEST(JSONSchema_bundle_2020_12, idempotency) { @@ -280,11 +280,11 @@ TEST(JSONSchema_bundle_2020_12, idempotency) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -331,7 +331,7 @@ TEST(JSONSchema_bundle_2020_12, pre_embedded) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -378,7 +378,7 @@ TEST(JSONSchema_bundle_2020_12, taken_definitions_entry) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -415,7 +415,7 @@ TEST(JSONSchema_bundle_2020_12, recursive) { "$ref": "https://www.sourcemeta.com/recursive" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -441,7 +441,7 @@ TEST(JSONSchema_bundle_2020_12, recursive_empty_fragment) { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -466,7 +466,7 @@ TEST(JSONSchema_bundle_2020_12, anonymous_no_dialect) { "$ref": "https://www.sourcemeta.com/anonymous" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver, "https://json-schema.org/draft/2020-12/schema"); @@ -490,7 +490,7 @@ TEST(JSONSchema_bundle_2020_12, relative_in_target_without_id) { "$ref": "nested/ref-string.json" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -526,7 +526,7 @@ TEST(JSONSchema_bundle_2020_12, relative_base_uri_with_ref) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -549,7 +549,7 @@ TEST(JSONSchema_bundle_2020_12, metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -578,7 +578,7 @@ TEST(JSONSchema_bundle_2020_12, hyperschema_smoke) { "$ref": "https://json-schema.org/draft/2020-12/hyper-schema" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.is_object()); @@ -593,7 +593,7 @@ TEST(JSONSchema_bundle_2020_12, hyperschema_1) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.defines("$defs")); diff --git a/test/jsonschema/jsonschema_bundle_draft0_test.cc b/test/jsonschema/jsonschema_bundle_draft0_test.cc index 5e376eb04..301c7228e 100644 --- a/test/jsonschema/jsonschema_bundle_draft0_test.cc +++ b/test/jsonschema/jsonschema_bundle_draft0_test.cc @@ -24,10 +24,10 @@ TEST(JSONSchema_bundle_draft0, no_references_no_id) { "$schema": "http://json-schema.org/draft-00/schema#" })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } TEST(JSONSchema_bundle_draft0, const_no_references_no_id) { @@ -35,10 +35,10 @@ TEST(JSONSchema_bundle_draft0, const_no_references_no_id) { "$schema": "http://json-schema.org/draft-00/schema#" })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } TEST(JSONSchema_bundle_draft0, simple_bundling) { @@ -50,8 +50,8 @@ TEST(JSONSchema_bundle_draft0, simple_bundling) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } diff --git a/test/jsonschema/jsonschema_bundle_draft1_test.cc b/test/jsonschema/jsonschema_bundle_draft1_test.cc index 471221b53..61ed26f21 100644 --- a/test/jsonschema/jsonschema_bundle_draft1_test.cc +++ b/test/jsonschema/jsonschema_bundle_draft1_test.cc @@ -24,10 +24,10 @@ TEST(JSONSchema_bundle_draft1, no_references_no_id) { "$schema": "http://json-schema.org/draft-01/schema#" })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } TEST(JSONSchema_bundle_draft1, const_no_references_no_id) { @@ -35,10 +35,10 @@ TEST(JSONSchema_bundle_draft1, const_no_references_no_id) { "$schema": "http://json-schema.org/draft-01/schema#" })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } TEST(JSONSchema_bundle_draft1, simple_bundling) { @@ -50,8 +50,8 @@ TEST(JSONSchema_bundle_draft1, simple_bundling) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } diff --git a/test/jsonschema/jsonschema_bundle_draft2_test.cc b/test/jsonschema/jsonschema_bundle_draft2_test.cc index 675f6af37..be16e057a 100644 --- a/test/jsonschema/jsonschema_bundle_draft2_test.cc +++ b/test/jsonschema/jsonschema_bundle_draft2_test.cc @@ -24,10 +24,10 @@ TEST(JSONSchema_bundle_draft2, no_references_no_id) { "$schema": "http://json-schema.org/draft-02/schema#" })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } TEST(JSONSchema_bundle_draft2, const_no_references_no_id) { @@ -35,10 +35,10 @@ TEST(JSONSchema_bundle_draft2, const_no_references_no_id) { "$schema": "http://json-schema.org/draft-02/schema#" })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } TEST(JSONSchema_bundle_draft2, simple_bundling) { @@ -50,8 +50,8 @@ TEST(JSONSchema_bundle_draft2, simple_bundling) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } diff --git a/test/jsonschema/jsonschema_bundle_draft3_test.cc b/test/jsonschema/jsonschema_bundle_draft3_test.cc index d67422ad0..6708bec00 100644 --- a/test/jsonschema/jsonschema_bundle_draft3_test.cc +++ b/test/jsonschema/jsonschema_bundle_draft3_test.cc @@ -24,10 +24,10 @@ TEST(JSONSchema_bundle_draft3, no_references_no_id) { "$schema": "http://json-schema.org/draft-03/schema#" })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } TEST(JSONSchema_bundle_draft3, const_no_references_no_id) { @@ -35,10 +35,10 @@ TEST(JSONSchema_bundle_draft3, const_no_references_no_id) { "$schema": "http://json-schema.org/draft-03/schema#" })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } TEST(JSONSchema_bundle_draft3, simple_bundling) { @@ -50,8 +50,8 @@ TEST(JSONSchema_bundle_draft3, simple_bundling) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } diff --git a/test/jsonschema/jsonschema_bundle_draft4_test.cc b/test/jsonschema/jsonschema_bundle_draft4_test.cc index 421d34347..7358d5e4a 100644 --- a/test/jsonschema/jsonschema_bundle_draft4_test.cc +++ b/test/jsonschema/jsonschema_bundle_draft4_test.cc @@ -73,7 +73,7 @@ TEST(JSONSchema_bundle_draft4, no_references_no_id) { "$schema": "http://json-schema.org/draft-04/schema#" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -89,7 +89,7 @@ TEST(JSONSchema_bundle_draft4, const_no_references_no_id) { })JSON"); const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::default_schema_walker, test_resolver); + document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "http://json-schema.org/draft-04/schema#" @@ -111,7 +111,7 @@ TEST(JSONSchema_bundle_draft4, simple_with_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -158,7 +158,7 @@ TEST(JSONSchema_bundle_draft4, simple_without_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -201,10 +201,10 @@ TEST(JSONSchema_bundle_draft4, schema_not_found) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaResolutionError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaResolutionError); } TEST(JSONSchema_bundle_draft4, idempotency) { @@ -216,11 +216,11 @@ TEST(JSONSchema_bundle_draft4, idempotency) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -267,7 +267,7 @@ TEST(JSONSchema_bundle_draft4, pre_embedded) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -314,7 +314,7 @@ TEST(JSONSchema_bundle_draft4, taken_definitions_entry) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -354,7 +354,7 @@ TEST(JSONSchema_bundle_draft4, allof_ref_definitions_type_no_id_no_external) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -374,7 +374,7 @@ TEST(JSONSchema_bundle_draft4, recursive) { "$ref": "https://www.sourcemeta.com/recursive" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -400,7 +400,7 @@ TEST(JSONSchema_bundle_draft4, recursive_empty_fragment) { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -425,7 +425,7 @@ TEST(JSONSchema_bundle_draft4, anonymous_no_dialect) { "$ref": "https://www.sourcemeta.com/anonymous" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver, "http://json-schema.org/draft-04/schema#"); @@ -448,7 +448,7 @@ TEST(JSONSchema_bundle_draft4, metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -475,7 +475,7 @@ TEST(JSONSchema_bundle_draft4, relative_base_uri_without_ref) { "id": "foo" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -498,7 +498,7 @@ TEST(JSONSchema_bundle_draft4, relative_base_uri_with_ref) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -523,7 +523,7 @@ TEST(JSONSchema_bundle_draft4, hyperschema_smoke) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.is_object()); @@ -538,7 +538,7 @@ TEST(JSONSchema_bundle_draft4, hyperschema_1) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.defines("definitions")); @@ -559,7 +559,7 @@ TEST(JSONSchema_bundle_draft4, hyperschema_ref_metaschema) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.defines("definitions")); diff --git a/test/jsonschema/jsonschema_bundle_draft6_test.cc b/test/jsonschema/jsonschema_bundle_draft6_test.cc index f48d3e862..d567f1daf 100644 --- a/test/jsonschema/jsonschema_bundle_draft6_test.cc +++ b/test/jsonschema/jsonschema_bundle_draft6_test.cc @@ -73,7 +73,7 @@ TEST(JSONSchema_bundle_draft6, no_references_no_id) { "$schema": "http://json-schema.org/draft-06/schema#" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -89,7 +89,7 @@ TEST(JSONSchema_bundle_draft6, const_no_references_no_id) { })JSON"); const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::default_schema_walker, test_resolver); + document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "http://json-schema.org/draft-06/schema#" @@ -111,7 +111,7 @@ TEST(JSONSchema_bundle_draft6, simple_with_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -158,7 +158,7 @@ TEST(JSONSchema_bundle_draft6, simple_without_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -201,10 +201,10 @@ TEST(JSONSchema_bundle_draft6, schema_not_found) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaResolutionError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaResolutionError); } TEST(JSONSchema_bundle_draft6, idempotency) { @@ -216,11 +216,11 @@ TEST(JSONSchema_bundle_draft6, idempotency) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -267,7 +267,7 @@ TEST(JSONSchema_bundle_draft6, pre_embedded) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -314,7 +314,7 @@ TEST(JSONSchema_bundle_draft6, taken_definitions_entry) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -351,7 +351,7 @@ TEST(JSONSchema_bundle_draft6, recursive) { "$ref": "https://www.sourcemeta.com/recursive" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -377,7 +377,7 @@ TEST(JSONSchema_bundle_draft6, recursive_empty_fragment) { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -402,7 +402,7 @@ TEST(JSONSchema_bundle_draft6, anonymous_no_dialect) { "$ref": "https://www.sourcemeta.com/anonymous" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver, "http://json-schema.org/draft-06/schema#"); @@ -425,7 +425,7 @@ TEST(JSONSchema_bundle_draft6, metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -458,7 +458,7 @@ TEST(JSONSchema_bundle_draft6, relative_base_uri_with_ref) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -483,7 +483,7 @@ TEST(JSONSchema_bundle_draft6, hyperschema_smoke) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.is_object()); @@ -498,7 +498,7 @@ TEST(JSONSchema_bundle_draft6, hyperschema_1) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.defines("definitions")); @@ -519,7 +519,7 @@ TEST(JSONSchema_bundle_draft6, hyperschema_ref_metaschema) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.defines("definitions")); diff --git a/test/jsonschema/jsonschema_bundle_draft7_test.cc b/test/jsonschema/jsonschema_bundle_draft7_test.cc index 1c11aeaf7..7bd57daeb 100644 --- a/test/jsonschema/jsonschema_bundle_draft7_test.cc +++ b/test/jsonschema/jsonschema_bundle_draft7_test.cc @@ -73,7 +73,7 @@ TEST(JSONSchema_bundle_draft7, no_references_no_id) { "$schema": "http://json-schema.org/draft-07/schema#" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -89,7 +89,7 @@ TEST(JSONSchema_bundle_draft7, const_no_references_no_id) { })JSON"); const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::default_schema_walker, test_resolver); + document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "http://json-schema.org/draft-07/schema#" @@ -111,7 +111,7 @@ TEST(JSONSchema_bundle_draft7, simple_with_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -158,7 +158,7 @@ TEST(JSONSchema_bundle_draft7, simple_without_id) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -201,10 +201,10 @@ TEST(JSONSchema_bundle_draft7, schema_not_found) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaResolutionError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaResolutionError); } TEST(JSONSchema_bundle_draft7, idempotency) { @@ -216,11 +216,11 @@ TEST(JSONSchema_bundle_draft7, idempotency) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -267,7 +267,7 @@ TEST(JSONSchema_bundle_draft7, pre_embedded) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -314,7 +314,7 @@ TEST(JSONSchema_bundle_draft7, taken_definitions_entry) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -351,7 +351,7 @@ TEST(JSONSchema_bundle_draft7, recursive) { "$ref": "https://www.sourcemeta.com/recursive" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -377,7 +377,7 @@ TEST(JSONSchema_bundle_draft7, recursive_empty_fragment) { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -402,7 +402,7 @@ TEST(JSONSchema_bundle_draft7, anonymous_no_dialect) { "$ref": "https://www.sourcemeta.com/anonymous" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver, "http://json-schema.org/draft-07/schema#"); @@ -425,7 +425,7 @@ TEST(JSONSchema_bundle_draft7, metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -458,7 +458,7 @@ TEST(JSONSchema_bundle_draft7, relative_base_uri_with_ref) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -483,7 +483,7 @@ TEST(JSONSchema_bundle_draft7, hyperschema_smoke) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.is_object()); @@ -498,7 +498,7 @@ TEST(JSONSchema_bundle_draft7, hyperschema_1) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.defines("definitions")); @@ -521,7 +521,7 @@ TEST(JSONSchema_bundle_draft7, hyperschema_ref_metaschema) { ] })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); EXPECT_TRUE(document.defines("definitions")); diff --git a/test/jsonschema/jsonschema_bundle_test.cc b/test/jsonschema/jsonschema_bundle_test.cc index b0f1e6cee..2bdea853d 100644 --- a/test/jsonschema/jsonschema_bundle_test.cc +++ b/test/jsonschema/jsonschema_bundle_test.cc @@ -52,7 +52,7 @@ TEST(JSONSchema_bundle, across_dialects) { "items": { "$ref": "https://www.sourcemeta.com/test-2" } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -89,7 +89,7 @@ TEST(JSONSchema_bundle, across_dialects_const) { })JSON"); const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::default_schema_walker, test_resolver); + document, sourcemeta::core::schema_official_walker, test_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$id": "https://www.example.com", @@ -124,7 +124,7 @@ TEST(JSONSchema_bundle, with_default_dialect) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver, "https://json-schema.org/draft/2020-12/schema"); @@ -151,10 +151,10 @@ TEST(JSONSchema_bundle, without_default_dialect) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaError); } TEST(JSONSchema_bundle, target_no_dialect) { @@ -165,10 +165,10 @@ TEST(JSONSchema_bundle, target_no_dialect) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaResolutionError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaResolutionError); } TEST(JSONSchema_bundle, target_array) { @@ -179,8 +179,8 @@ TEST(JSONSchema_bundle, target_array) { } })JSON"); - EXPECT_THROW(sourcemeta::core::bundle(document, - sourcemeta::core::default_schema_walker, - test_resolver), - sourcemeta::core::SchemaResolutionError); + EXPECT_THROW( + sourcemeta::core::bundle( + document, sourcemeta::core::schema_official_walker, test_resolver), + sourcemeta::core::SchemaResolutionError); } diff --git a/test/jsonschema/jsonschema_default_walker_2019_09_test.cc b/test/jsonschema/jsonschema_default_walker_2019_09_test.cc index 0c69fca59..a5dd521b8 100644 --- a/test/jsonschema/jsonschema_default_walker_2019_09_test.cc +++ b/test/jsonschema/jsonschema_default_walker_2019_09_test.cc @@ -33,7 +33,7 @@ static const std::map VOCABULARIES_2019_09_HYPERSCHEMA{ TEST(JSONSchema_default_walker_2019_09, core_schema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$schema", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("$schema", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -44,7 +44,7 @@ TEST(JSONSchema_default_walker_2019_09, core_schema) { TEST(JSONSchema_default_walker_2019_09, core_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$vocabulary", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("$vocabulary", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -54,7 +54,7 @@ TEST(JSONSchema_default_walker_2019_09, core_vocabulary) { TEST(JSONSchema_default_walker_2019_09, core_id) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$id", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("$id", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -65,7 +65,7 @@ TEST(JSONSchema_default_walker_2019_09, core_id) { TEST(JSONSchema_default_walker_2019_09, core_anchor) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$anchor", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("$anchor", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -76,7 +76,7 @@ TEST(JSONSchema_default_walker_2019_09, core_anchor) { TEST(JSONSchema_default_walker_2019_09, core_recursiveAnchor) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$recursiveAnchor", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("$recursiveAnchor", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -86,7 +86,7 @@ TEST(JSONSchema_default_walker_2019_09, core_recursiveAnchor) { TEST(JSONSchema_default_walker_2019_09, core_ref) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$ref", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("$ref", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -97,7 +97,7 @@ TEST(JSONSchema_default_walker_2019_09, core_ref) { TEST(JSONSchema_default_walker_2019_09, core_recursiveRef) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$recursiveRef", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("$recursiveRef", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -107,7 +107,7 @@ TEST(JSONSchema_default_walker_2019_09, core_recursiveRef) { TEST(JSONSchema_default_walker_2019_09, core_defs) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$defs", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("$defs", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -118,7 +118,7 @@ TEST(JSONSchema_default_walker_2019_09, core_defs) { TEST(JSONSchema_default_walker_2019_09, core_comment) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$comment", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("$comment", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -129,7 +129,7 @@ TEST(JSONSchema_default_walker_2019_09, core_comment) { TEST(JSONSchema_default_walker_2019_09, applicator_allOf) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("allOf", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("allOf", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInline); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -140,7 +140,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_allOf) { TEST(JSONSchema_default_walker_2019_09, applicator_anyOf) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("anyOf", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("anyOf", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -151,7 +151,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_anyOf) { TEST(JSONSchema_default_walker_2019_09, applicator_oneOf) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("oneOf", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("oneOf", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -162,7 +162,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_oneOf) { TEST(JSONSchema_default_walker_2019_09, applicator_not) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("not", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("not", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOther); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -173,7 +173,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_not) { TEST(JSONSchema_default_walker_2019_09, applicator_if) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("if", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("if", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -184,7 +184,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_if) { TEST(JSONSchema_default_walker_2019_09, applicator_then) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("then", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("then", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -196,7 +196,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_then) { TEST(JSONSchema_default_walker_2019_09, applicator_else) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("else", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("else", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -207,8 +207,8 @@ TEST(JSONSchema_default_walker_2019_09, applicator_else) { TEST(JSONSchema_default_walker_2019_09, applicator_dependentSchemas) { using namespace sourcemeta::core; - const auto result{default_schema_walker("dependentSchemas", - VOCABULARIES_2019_09_APPLICATOR)}; + const auto result{schema_official_walker("dependentSchemas", + VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembersInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -219,7 +219,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_dependentSchemas) { TEST(JSONSchema_default_walker_2019_09, applicator_items) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("items", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("items", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -229,8 +229,8 @@ TEST(JSONSchema_default_walker_2019_09, applicator_items) { TEST(JSONSchema_default_walker_2019_09, applicator_additionalItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("additionalItems", - VOCABULARIES_2019_09_APPLICATOR)}; + const auto result{schema_official_walker("additionalItems", + VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -242,7 +242,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_additionalItems) { TEST(JSONSchema_default_walker_2019_09, applicator_contains_only) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contains", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("contains", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -259,7 +259,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_contains_with_validation) { std::copy(VOCABULARIES_2019_09_VALIDATION.cbegin(), VOCABULARIES_2019_09_VALIDATION.cend(), std::inserter(vocabularies, vocabularies.end())); - const auto result{default_schema_walker("contains", vocabularies)}; + const auto result{schema_official_walker("contains", vocabularies)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -271,7 +271,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_contains_with_validation) { TEST(JSONSchema_default_walker_2019_09, applicator_properties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("properties", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("properties", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -281,8 +281,8 @@ TEST(JSONSchema_default_walker_2019_09, applicator_properties) { TEST(JSONSchema_default_walker_2019_09, applicator_patternProperties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("patternProperties", - VOCABULARIES_2019_09_APPLICATOR)}; + const auto result{schema_official_walker("patternProperties", + VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -292,8 +292,8 @@ TEST(JSONSchema_default_walker_2019_09, applicator_patternProperties) { TEST(JSONSchema_default_walker_2019_09, applicator_additionalProperties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("additionalProperties", - VOCABULARIES_2019_09_APPLICATOR)}; + const auto result{schema_official_walker("additionalProperties", + VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -305,7 +305,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_additionalProperties) { TEST(JSONSchema_default_walker_2019_09, applicator_propertyNames) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("propertyNames", VOCABULARIES_2019_09_APPLICATOR)}; + schema_official_walker("propertyNames", VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -315,8 +315,8 @@ TEST(JSONSchema_default_walker_2019_09, applicator_propertyNames) { TEST(JSONSchema_default_walker_2019_09, applicator_unevaluatedItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("unevaluatedItems", - VOCABULARIES_2019_09_APPLICATOR)}; + const auto result{schema_official_walker("unevaluatedItems", + VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -327,8 +327,8 @@ TEST(JSONSchema_default_walker_2019_09, applicator_unevaluatedItems) { TEST(JSONSchema_default_walker_2019_09, applicator_unevaluatedProperties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("unevaluatedProperties", - VOCABULARIES_2019_09_APPLICATOR)}; + const auto result{schema_official_walker("unevaluatedProperties", + VOCABULARIES_2019_09_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -341,7 +341,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_unevaluatedProperties) { TEST(JSONSchema_default_walker_2019_09, validation_type) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("type", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("type", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -352,7 +352,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_type) { TEST(JSONSchema_default_walker_2019_09, validation_enum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("enum", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("enum", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -363,7 +363,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_enum) { TEST(JSONSchema_default_walker_2019_09, validation_const) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("const", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("const", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -374,7 +374,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_const) { TEST(JSONSchema_default_walker_2019_09, validation_multipleOf) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("multipleOf", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("multipleOf", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -385,7 +385,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_multipleOf) { TEST(JSONSchema_default_walker_2019_09, validation_maximum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximum", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("maximum", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -397,7 +397,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maximum) { TEST(JSONSchema_default_walker_2019_09, validation_minimum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimum", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("minimum", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -408,8 +408,8 @@ TEST(JSONSchema_default_walker_2019_09, validation_minimum) { TEST(JSONSchema_default_walker_2019_09, validation_exclusiveMaximum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("exclusiveMaximum", - VOCABULARIES_2019_09_VALIDATION)}; + const auto result{schema_official_walker("exclusiveMaximum", + VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -419,8 +419,8 @@ TEST(JSONSchema_default_walker_2019_09, validation_exclusiveMaximum) { TEST(JSONSchema_default_walker_2019_09, validation_exclusiveMinimum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("exclusiveMinimum", - VOCABULARIES_2019_09_VALIDATION)}; + const auto result{schema_official_walker("exclusiveMinimum", + VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -431,7 +431,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_exclusiveMinimum) { TEST(JSONSchema_default_walker_2019_09, validation_maxLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxLength", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("maxLength", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -442,7 +442,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maxLength) { TEST(JSONSchema_default_walker_2019_09, validation_minLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minLength", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("minLength", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -453,7 +453,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_minLength) { TEST(JSONSchema_default_walker_2019_09, validation_pattern) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pattern", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("pattern", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -464,7 +464,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_pattern) { TEST(JSONSchema_default_walker_2019_09, validation_maxItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxItems", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("maxItems", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -475,7 +475,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maxItems) { TEST(JSONSchema_default_walker_2019_09, validation_minItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minItems", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("minItems", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -486,7 +486,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_minItems) { TEST(JSONSchema_default_walker_2019_09, validation_uniqueItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("uniqueItems", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("uniqueItems", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -497,7 +497,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_uniqueItems) { TEST(JSONSchema_default_walker_2019_09, validation_maxContains) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxContains", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("maxContains", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -508,7 +508,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maxContains) { TEST(JSONSchema_default_walker_2019_09, validation_minContains) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minContains", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("minContains", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -519,7 +519,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_minContains) { TEST(JSONSchema_default_walker_2019_09, validation_maxProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxProperties", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("maxProperties", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -530,7 +530,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maxProperties) { TEST(JSONSchema_default_walker_2019_09, validation_minProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minProperties", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("minProperties", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -541,7 +541,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_minProperties) { TEST(JSONSchema_default_walker_2019_09, validation_required) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("required", VOCABULARIES_2019_09_VALIDATION)}; + schema_official_walker("required", VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -551,8 +551,8 @@ TEST(JSONSchema_default_walker_2019_09, validation_required) { TEST(JSONSchema_default_walker_2019_09, validation_dependentRequired) { using namespace sourcemeta::core; - const auto result{default_schema_walker("dependentRequired", - VOCABULARIES_2019_09_VALIDATION)}; + const auto result{schema_official_walker("dependentRequired", + VOCABULARIES_2019_09_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -563,7 +563,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_dependentRequired) { TEST(JSONSchema_default_walker_2019_09, format_format) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("format", VOCABULARIES_2019_09_FORMAT)}; + schema_official_walker("format", VOCABULARIES_2019_09_FORMAT)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -574,7 +574,7 @@ TEST(JSONSchema_default_walker_2019_09, format_format) { TEST(JSONSchema_default_walker_2019_09, content_contentEncoding) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentEncoding", VOCABULARIES_2019_09_CONTENT)}; + schema_official_walker("contentEncoding", VOCABULARIES_2019_09_CONTENT)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -585,7 +585,7 @@ TEST(JSONSchema_default_walker_2019_09, content_contentEncoding) { TEST(JSONSchema_default_walker_2019_09, content_contentMediaType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentMediaType", VOCABULARIES_2019_09_CONTENT)}; + schema_official_walker("contentMediaType", VOCABULARIES_2019_09_CONTENT)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -596,7 +596,7 @@ TEST(JSONSchema_default_walker_2019_09, content_contentMediaType) { TEST(JSONSchema_default_walker_2019_09, content_contentSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentSchema", VOCABULARIES_2019_09_CONTENT)}; + schema_official_walker("contentSchema", VOCABULARIES_2019_09_CONTENT)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOther); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -607,7 +607,7 @@ TEST(JSONSchema_default_walker_2019_09, content_contentSchema) { TEST(JSONSchema_default_walker_2019_09, metadata_title) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("title", VOCABULARIES_2019_09_METADATA)}; + schema_official_walker("title", VOCABULARIES_2019_09_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -618,7 +618,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_title) { TEST(JSONSchema_default_walker_2019_09, metadata_description) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("description", VOCABULARIES_2019_09_METADATA)}; + schema_official_walker("description", VOCABULARIES_2019_09_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -629,7 +629,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_description) { TEST(JSONSchema_default_walker_2019_09, metadata_default) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("default", VOCABULARIES_2019_09_METADATA)}; + schema_official_walker("default", VOCABULARIES_2019_09_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -640,7 +640,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_default) { TEST(JSONSchema_default_walker_2019_09, metadata_deprecated) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("deprecated", VOCABULARIES_2019_09_METADATA)}; + schema_official_walker("deprecated", VOCABULARIES_2019_09_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -651,7 +651,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_deprecated) { TEST(JSONSchema_default_walker_2019_09, metadata_readOnly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readOnly", VOCABULARIES_2019_09_METADATA)}; + schema_official_walker("readOnly", VOCABULARIES_2019_09_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -662,7 +662,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_readOnly) { TEST(JSONSchema_default_walker_2019_09, metadata_writeOnly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("writeOnly", VOCABULARIES_2019_09_METADATA)}; + schema_official_walker("writeOnly", VOCABULARIES_2019_09_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -673,7 +673,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_writeOnly) { TEST(JSONSchema_default_walker_2019_09, metadata_examples) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("examples", VOCABULARIES_2019_09_METADATA)}; + schema_official_walker("examples", VOCABULARIES_2019_09_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -684,7 +684,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_examples) { TEST(JSONSchema_default_walker_2019_09, hyperschema_base) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("base", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("base", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -693,7 +693,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_base) { TEST(JSONSchema_default_walker_2019_09, hyperschema_links) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("links", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("links", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -702,7 +702,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_links) { TEST(JSONSchema_default_walker_2019_09, hyperschema_ref) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("ref", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("ref", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -711,7 +711,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_ref) { TEST(JSONSchema_default_walker_2019_09, hyperschema_href) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("href", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("href", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -720,7 +720,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_href) { TEST(JSONSchema_default_walker_2019_09, hyperschema_anchor) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("anchor", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("anchor", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -728,8 +728,8 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_anchor) { TEST(JSONSchema_default_walker_2019_09, hyperschema_anchorPointer) { using namespace sourcemeta::core; - const auto result{ - default_schema_walker("anchorPointer", VOCABULARIES_2019_09_HYPERSCHEMA)}; + const auto result{schema_official_walker("anchorPointer", + VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -738,7 +738,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_anchorPointer) { TEST(JSONSchema_default_walker_2019_09, hyperschema_rel) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("rel", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("rel", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -746,8 +746,8 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_rel) { TEST(JSONSchema_default_walker_2019_09, hyperschema_templatePointers) { using namespace sourcemeta::core; - const auto result{default_schema_walker("templatePointers", - VOCABULARIES_2019_09_HYPERSCHEMA)}; + const auto result{schema_official_walker("templatePointers", + VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -755,8 +755,8 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_templatePointers) { TEST(JSONSchema_default_walker_2019_09, hyperschema_templateRequired) { using namespace sourcemeta::core; - const auto result{default_schema_walker("templateRequired", - VOCABULARIES_2019_09_HYPERSCHEMA)}; + const auto result{schema_official_walker("templateRequired", + VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -764,8 +764,8 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_templateRequired) { TEST(JSONSchema_default_walker_2019_09, hyperschema_targetMediaType) { using namespace sourcemeta::core; - const auto result{default_schema_walker("targetMediaType", - VOCABULARIES_2019_09_HYPERSCHEMA)}; + const auto result{schema_official_walker("targetMediaType", + VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -774,7 +774,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_targetMediaType) { TEST(JSONSchema_default_walker_2019_09, hyperschema_targetHints) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetHints", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("targetHints", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -782,8 +782,8 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_targetHints) { TEST(JSONSchema_default_walker_2019_09, hyperschema_submissionMediaType) { using namespace sourcemeta::core; - const auto result{default_schema_walker("submissionMediaType", - VOCABULARIES_2019_09_HYPERSCHEMA)}; + const auto result{schema_official_walker("submissionMediaType", + VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -792,7 +792,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_submissionMediaType) { TEST(JSONSchema_default_walker_2019_09, hyperschema_hrefSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("hrefSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("hrefSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -803,7 +803,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_hrefSchema) { TEST(JSONSchema_default_walker_2019_09, hyperschema_targetSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("targetSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -814,7 +814,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_targetSchema) { TEST(JSONSchema_default_walker_2019_09, hyperschema_headerSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("headerSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; + schema_official_walker("headerSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -824,8 +824,8 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_headerSchema) { TEST(JSONSchema_default_walker_2019_09, hyperschema_submissionSchema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("submissionSchema", - VOCABULARIES_2019_09_HYPERSCHEMA)}; + const auto result{schema_official_walker("submissionSchema", + VOCABULARIES_2019_09_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -835,7 +835,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_submissionSchema) { TEST(JSONSchema_default_walker_2019_09, applicator_allOf_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("allOf", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("allOf", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -843,7 +843,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_allOf_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, applicator_anyOf_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("anyOf", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("anyOf", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -851,7 +851,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_anyOf_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, applicator_oneOf_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("oneOf", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("oneOf", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -859,7 +859,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_oneOf_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, applicator_not_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("not", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("not", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -867,7 +867,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_not_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, applicator_if_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("if", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("if", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -875,7 +875,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_if_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, applicator_then_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("then", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("then", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -883,7 +883,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_then_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, applicator_else_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("else", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("else", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -893,7 +893,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_dependentSchemas_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("dependentSchemas", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("dependentSchemas", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -903,7 +903,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_additionalItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalItems", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("additionalItems", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -911,7 +911,7 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, applicator_items_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("items", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("items", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -921,7 +921,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_contains_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contains", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("contains", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -931,7 +931,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_properties_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("properties", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("properties", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -941,7 +941,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_patternProperties_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("patternProperties", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("patternProperties", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -950,8 +950,8 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, applicator_additionalProperties_without_vocabulary) { using namespace sourcemeta::core; - const auto result{ - default_schema_walker("additionalProperties", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("additionalProperties", + VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -961,7 +961,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_propertyNames_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("propertyNames", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("propertyNames", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -971,7 +971,7 @@ TEST(JSONSchema_default_walker_2019_09, applicator_unevaluatedItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("unevaluatedItems", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("unevaluatedItems", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -980,8 +980,8 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, applicator_unevaluatedProperties_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("unevaluatedProperties", - VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("unevaluatedProperties", + VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -989,7 +989,7 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, validation_type_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("type", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("type", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -997,7 +997,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_type_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, validation_enum_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enum", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("enum", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1005,7 +1005,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_enum_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, validation_const_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("const", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("const", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1015,7 +1015,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_multipleOf_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("multipleOf", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("multipleOf", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1024,7 +1024,7 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, validation_maximum_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximum", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("maximum", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1033,7 +1033,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maximum_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, validation_minimum_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimum", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("minimum", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1043,7 +1043,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_exclusiveMaximum_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMaximum", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("exclusiveMaximum", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1053,7 +1053,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_exclusiveMinimum_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMinimum", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("exclusiveMinimum", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1063,7 +1063,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maxLength_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxLength", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("maxLength", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1073,7 +1073,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_minLength_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minLength", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("minLength", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1082,7 +1082,7 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, validation_pattern_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pattern", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("pattern", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1092,7 +1092,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maxItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxItems", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("maxItems", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1102,7 +1102,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_minItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minItems", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("minItems", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1112,7 +1112,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_uniqueItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("uniqueItems", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("uniqueItems", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1122,7 +1122,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maxContains_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxContains", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("maxContains", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1132,7 +1132,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_minContains_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minContains", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("minContains", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1142,7 +1142,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_maxProperties_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxProperties", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("maxProperties", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1152,7 +1152,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_minProperties_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minProperties", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("minProperties", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1162,7 +1162,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_required_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("required", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("required", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1172,7 +1172,7 @@ TEST(JSONSchema_default_walker_2019_09, validation_dependentRequired_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("dependentRequired", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("dependentRequired", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1180,7 +1180,8 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, format_format_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_2019_09_CORE)}; + const auto result{ + schema_official_walker("format", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1190,7 +1191,7 @@ TEST(JSONSchema_default_walker_2019_09, content_contentEncoding_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentEncoding", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("contentEncoding", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1200,7 +1201,7 @@ TEST(JSONSchema_default_walker_2019_09, content_contentMediaType_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentMediaType", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("contentMediaType", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1210,7 +1211,7 @@ TEST(JSONSchema_default_walker_2019_09, content_contentSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentSchema", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("contentSchema", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1218,7 +1219,7 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, metadata_title_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("title", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("title", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1228,7 +1229,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_description_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("description", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("description", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1237,7 +1238,7 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, metadata_default_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("default", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("default", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1247,7 +1248,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_deprecated_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("deprecated", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("deprecated", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1256,7 +1257,7 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, metadata_readOnly_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readOnly", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("readOnly", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1265,7 +1266,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_readOnly_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, metadata_writeOnly_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("writeOnly", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("writeOnly", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1274,7 +1275,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_writeOnly_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, metadata_examples_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("examples", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("examples", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1282,7 +1283,7 @@ TEST(JSONSchema_default_walker_2019_09, metadata_examples_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, hyperschema_base_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("base", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("base", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1290,7 +1291,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_base_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, hyperschema_links_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("links", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("links", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1298,7 +1299,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_links_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, hyperschema_ref_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("ref", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("ref", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1306,7 +1307,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_ref_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, hyperschema_href_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("href", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("href", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1314,7 +1315,8 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_href_without_vocabulary) { TEST(JSONSchema_default_walker_2019_09, hyperschema_anchor_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("anchor", VOCABULARIES_2019_09_CORE)}; + const auto result{ + schema_official_walker("anchor", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1324,7 +1326,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_anchorPointer_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("anchorPointer", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("anchorPointer", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1332,7 +1334,7 @@ TEST(JSONSchema_default_walker_2019_09, TEST(JSONSchema_default_walker_2019_09, hyperschema_rel_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("rel", VOCABULARIES_2019_09_CORE)}; + const auto result{schema_official_walker("rel", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1342,7 +1344,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_templatePointers_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("templatePointers", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("templatePointers", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1352,7 +1354,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_templateRequired_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("templateRequired", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("templateRequired", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1362,7 +1364,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_targetMediaType_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetMediaType", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("targetMediaType", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1372,7 +1374,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_targetHints_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetHints", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("targetHints", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1382,7 +1384,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_submissionMediaType_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("submissionMediaType", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("submissionMediaType", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1392,7 +1394,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_hrefSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("hrefSchema", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("hrefSchema", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1402,7 +1404,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_targetSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetSchema", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("targetSchema", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1412,7 +1414,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_headerSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("headerSchema", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("headerSchema", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1422,7 +1424,7 @@ TEST(JSONSchema_default_walker_2019_09, hyperschema_submissionSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("submissionSchema", VOCABULARIES_2019_09_CORE)}; + schema_official_walker("submissionSchema", VOCABULARIES_2019_09_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1437,7 +1439,7 @@ TEST(JSONSchema_default_walker_2019_09, schema_keyword_priority_array) { VOCABULARIES_2019_09_VALIDATION.cend(), std::inserter(vocabularies, vocabularies.end())); - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 0); EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), @@ -1451,7 +1453,7 @@ TEST(JSONSchema_default_walker_2019_09, schema_keyword_priority_array) { TEST(JSONSchema_default_walker_2019_09, schema_keyword_priority_object) { const auto &vocabularies = VOCABULARIES_2019_09_APPLICATOR; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), @@ -1465,7 +1467,7 @@ TEST(JSONSchema_default_walker_2019_09, schema_keyword_priority_object) { TEST(JSONSchema_default_walker_2019_09, schema_keyword_priority_other) { const auto &vocabularies = VOCABULARIES_2019_09_APPLICATOR; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("if", vocabularies, walker), 0); EXPECT_EQ(schema_keyword_priority("then", vocabularies, walker), 1); @@ -1474,7 +1476,7 @@ TEST(JSONSchema_default_walker_2019_09, schema_keyword_priority_other) { TEST(JSONSchema_default_walker_2019_09, schema_keyword_priority_unknown) { const auto &vocabularies = VOCABULARIES_2019_09_CORE; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); } diff --git a/test/jsonschema/jsonschema_default_walker_2020_12_test.cc b/test/jsonschema/jsonschema_default_walker_2020_12_test.cc index 64970888f..84fbc7c64 100644 --- a/test/jsonschema/jsonschema_default_walker_2020_12_test.cc +++ b/test/jsonschema/jsonschema_default_walker_2020_12_test.cc @@ -41,7 +41,7 @@ static const std::map VOCABULARIES_2020_12_HYPERSCHEMA{ TEST(JSONSchema_default_walker_2020_12, core_schema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$schema", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("$schema", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -52,7 +52,7 @@ TEST(JSONSchema_default_walker_2020_12, core_schema) { TEST(JSONSchema_default_walker_2020_12, core_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$vocabulary", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("$vocabulary", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -62,7 +62,7 @@ TEST(JSONSchema_default_walker_2020_12, core_vocabulary) { TEST(JSONSchema_default_walker_2020_12, core_id) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$id", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("$id", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -73,7 +73,7 @@ TEST(JSONSchema_default_walker_2020_12, core_id) { TEST(JSONSchema_default_walker_2020_12, core_anchor) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$anchor", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("$anchor", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -84,7 +84,7 @@ TEST(JSONSchema_default_walker_2020_12, core_anchor) { TEST(JSONSchema_default_walker_2020_12, core_dynamicAnchor) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$dynamicAnchor", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("$dynamicAnchor", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -94,7 +94,7 @@ TEST(JSONSchema_default_walker_2020_12, core_dynamicAnchor) { TEST(JSONSchema_default_walker_2020_12, core_ref) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$ref", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("$ref", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -105,7 +105,7 @@ TEST(JSONSchema_default_walker_2020_12, core_ref) { TEST(JSONSchema_default_walker_2020_12, core_dynamicRef) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$dynamicRef", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("$dynamicRef", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -115,7 +115,7 @@ TEST(JSONSchema_default_walker_2020_12, core_dynamicRef) { TEST(JSONSchema_default_walker_2020_12, core_defs) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$defs", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("$defs", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -126,7 +126,7 @@ TEST(JSONSchema_default_walker_2020_12, core_defs) { TEST(JSONSchema_default_walker_2020_12, core_comment) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$comment", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("$comment", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -137,7 +137,7 @@ TEST(JSONSchema_default_walker_2020_12, core_comment) { TEST(JSONSchema_default_walker_2020_12, applicator_allOf) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("allOf", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("allOf", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInline); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -148,7 +148,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_allOf) { TEST(JSONSchema_default_walker_2020_12, applicator_anyOf) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("anyOf", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("anyOf", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -159,7 +159,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_anyOf) { TEST(JSONSchema_default_walker_2020_12, applicator_oneOf) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("oneOf", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("oneOf", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -170,7 +170,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_oneOf) { TEST(JSONSchema_default_walker_2020_12, applicator_not) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("not", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("not", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOther); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -181,7 +181,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_not) { TEST(JSONSchema_default_walker_2020_12, applicator_if) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("if", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("if", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -192,7 +192,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_if) { TEST(JSONSchema_default_walker_2020_12, applicator_then) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("then", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("then", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -204,7 +204,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_then) { TEST(JSONSchema_default_walker_2020_12, applicator_else) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("else", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("else", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -215,8 +215,8 @@ TEST(JSONSchema_default_walker_2020_12, applicator_else) { TEST(JSONSchema_default_walker_2020_12, applicator_dependentSchemas) { using namespace sourcemeta::core; - const auto result{default_schema_walker("dependentSchemas", - VOCABULARIES_2020_12_APPLICATOR)}; + const auto result{schema_official_walker("dependentSchemas", + VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembersInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -227,7 +227,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_dependentSchemas) { TEST(JSONSchema_default_walker_2020_12, applicator_prefixItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("prefixItems", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("prefixItems", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -238,7 +238,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_prefixItems) { TEST(JSONSchema_default_walker_2020_12, applicator_items) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("items", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("items", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -250,7 +250,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_items) { TEST(JSONSchema_default_walker_2020_12, applicator_contains_only) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contains", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("contains", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -267,7 +267,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_contains_with_validation) { std::copy(VOCABULARIES_2020_12_VALIDATION.cbegin(), VOCABULARIES_2020_12_VALIDATION.cend(), std::inserter(vocabularies, vocabularies.end())); - const auto result{default_schema_walker("contains", vocabularies)}; + const auto result{schema_official_walker("contains", vocabularies)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -279,7 +279,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_contains_with_validation) { TEST(JSONSchema_default_walker_2020_12, applicator_properties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("properties", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("properties", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -289,8 +289,8 @@ TEST(JSONSchema_default_walker_2020_12, applicator_properties) { TEST(JSONSchema_default_walker_2020_12, applicator_patternProperties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("patternProperties", - VOCABULARIES_2020_12_APPLICATOR)}; + const auto result{schema_official_walker("patternProperties", + VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -300,8 +300,8 @@ TEST(JSONSchema_default_walker_2020_12, applicator_patternProperties) { TEST(JSONSchema_default_walker_2020_12, applicator_additionalProperties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("additionalProperties", - VOCABULARIES_2020_12_APPLICATOR)}; + const auto result{schema_official_walker("additionalProperties", + VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -313,7 +313,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_additionalProperties) { TEST(JSONSchema_default_walker_2020_12, applicator_propertyNames) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("propertyNames", VOCABULARIES_2020_12_APPLICATOR)}; + schema_official_walker("propertyNames", VOCABULARIES_2020_12_APPLICATOR)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -323,8 +323,8 @@ TEST(JSONSchema_default_walker_2020_12, applicator_propertyNames) { TEST(JSONSchema_default_walker_2020_12, unevaluated_unevaluatedItems_only) { using namespace sourcemeta::core; - const auto result{default_schema_walker("unevaluatedItems", - VOCABULARIES_2020_12_UNEVALUATED)}; + const auto result{schema_official_walker("unevaluatedItems", + VOCABULARIES_2020_12_UNEVALUATED)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -342,7 +342,7 @@ TEST(JSONSchema_default_walker_2020_12, std::copy(VOCABULARIES_2020_12_APPLICATOR.cbegin(), VOCABULARIES_2020_12_APPLICATOR.cend(), std::inserter(vocabularies, vocabularies.end())); - const auto result{default_schema_walker("unevaluatedItems", vocabularies)}; + const auto result{schema_official_walker("unevaluatedItems", vocabularies)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -354,8 +354,8 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, unevaluated_unevaluatedProperties_only) { using namespace sourcemeta::core; - const auto result{default_schema_walker("unevaluatedProperties", - VOCABULARIES_2020_12_UNEVALUATED)}; + const auto result{schema_official_walker("unevaluatedProperties", + VOCABULARIES_2020_12_UNEVALUATED)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -374,7 +374,7 @@ TEST(JSONSchema_default_walker_2020_12, VOCABULARIES_2020_12_APPLICATOR.cend(), std::inserter(vocabularies, vocabularies.end())); const auto result{ - default_schema_walker("unevaluatedProperties", vocabularies)}; + schema_official_walker("unevaluatedProperties", vocabularies)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -387,7 +387,7 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, validation_type) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("type", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("type", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -398,7 +398,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_type) { TEST(JSONSchema_default_walker_2020_12, validation_enum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("enum", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("enum", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -409,7 +409,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_enum) { TEST(JSONSchema_default_walker_2020_12, validation_const) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("const", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("const", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -420,7 +420,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_const) { TEST(JSONSchema_default_walker_2020_12, validation_multipleOf) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("multipleOf", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("multipleOf", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -431,7 +431,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_multipleOf) { TEST(JSONSchema_default_walker_2020_12, validation_maximum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximum", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("maximum", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -443,7 +443,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maximum) { TEST(JSONSchema_default_walker_2020_12, validation_minimum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimum", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("minimum", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -454,8 +454,8 @@ TEST(JSONSchema_default_walker_2020_12, validation_minimum) { TEST(JSONSchema_default_walker_2020_12, validation_exclusiveMaximum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("exclusiveMaximum", - VOCABULARIES_2020_12_VALIDATION)}; + const auto result{schema_official_walker("exclusiveMaximum", + VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -465,8 +465,8 @@ TEST(JSONSchema_default_walker_2020_12, validation_exclusiveMaximum) { TEST(JSONSchema_default_walker_2020_12, validation_exclusiveMinimum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("exclusiveMinimum", - VOCABULARIES_2020_12_VALIDATION)}; + const auto result{schema_official_walker("exclusiveMinimum", + VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -477,7 +477,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_exclusiveMinimum) { TEST(JSONSchema_default_walker_2020_12, validation_maxLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxLength", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("maxLength", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -488,7 +488,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maxLength) { TEST(JSONSchema_default_walker_2020_12, validation_minLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minLength", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("minLength", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -499,7 +499,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_minLength) { TEST(JSONSchema_default_walker_2020_12, validation_pattern) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pattern", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("pattern", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -510,7 +510,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_pattern) { TEST(JSONSchema_default_walker_2020_12, validation_maxItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxItems", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("maxItems", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -521,7 +521,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maxItems) { TEST(JSONSchema_default_walker_2020_12, validation_minItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minItems", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("minItems", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -532,7 +532,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_minItems) { TEST(JSONSchema_default_walker_2020_12, validation_uniqueItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("uniqueItems", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("uniqueItems", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -543,7 +543,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_uniqueItems) { TEST(JSONSchema_default_walker_2020_12, validation_maxContains) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxContains", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("maxContains", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -554,7 +554,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maxContains) { TEST(JSONSchema_default_walker_2020_12, validation_minContains) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minContains", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("minContains", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -565,7 +565,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_minContains) { TEST(JSONSchema_default_walker_2020_12, validation_maxProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxProperties", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("maxProperties", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -576,7 +576,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maxProperties) { TEST(JSONSchema_default_walker_2020_12, validation_minProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minProperties", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("minProperties", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -587,7 +587,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_minProperties) { TEST(JSONSchema_default_walker_2020_12, validation_required) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("required", VOCABULARIES_2020_12_VALIDATION)}; + schema_official_walker("required", VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -597,8 +597,8 @@ TEST(JSONSchema_default_walker_2020_12, validation_required) { TEST(JSONSchema_default_walker_2020_12, validation_dependentRequired) { using namespace sourcemeta::core; - const auto result{default_schema_walker("dependentRequired", - VOCABULARIES_2020_12_VALIDATION)}; + const auto result{schema_official_walker("dependentRequired", + VOCABULARIES_2020_12_VALIDATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -609,7 +609,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_dependentRequired) { TEST(JSONSchema_default_walker_2020_12, format_annotation_format) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("format", VOCABULARIES_2020_12_FORMAT_ANNOTATION)}; + schema_official_walker("format", VOCABULARIES_2020_12_FORMAT_ANNOTATION)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -620,7 +620,7 @@ TEST(JSONSchema_default_walker_2020_12, format_annotation_format) { TEST(JSONSchema_default_walker_2020_12, format_assertion_format) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("format", VOCABULARIES_2020_12_FORMAT_ASSERTION)}; + schema_official_walker("format", VOCABULARIES_2020_12_FORMAT_ASSERTION)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -631,7 +631,7 @@ TEST(JSONSchema_default_walker_2020_12, format_assertion_format) { TEST(JSONSchema_default_walker_2020_12, content_contentEncoding) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentEncoding", VOCABULARIES_2020_12_CONTENT)}; + schema_official_walker("contentEncoding", VOCABULARIES_2020_12_CONTENT)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -642,7 +642,7 @@ TEST(JSONSchema_default_walker_2020_12, content_contentEncoding) { TEST(JSONSchema_default_walker_2020_12, content_contentMediaType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentMediaType", VOCABULARIES_2020_12_CONTENT)}; + schema_official_walker("contentMediaType", VOCABULARIES_2020_12_CONTENT)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -653,7 +653,7 @@ TEST(JSONSchema_default_walker_2020_12, content_contentMediaType) { TEST(JSONSchema_default_walker_2020_12, content_contentSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentSchema", VOCABULARIES_2020_12_CONTENT)}; + schema_official_walker("contentSchema", VOCABULARIES_2020_12_CONTENT)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOther); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -664,7 +664,7 @@ TEST(JSONSchema_default_walker_2020_12, content_contentSchema) { TEST(JSONSchema_default_walker_2020_12, metadata_title) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("title", VOCABULARIES_2020_12_METADATA)}; + schema_official_walker("title", VOCABULARIES_2020_12_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -675,7 +675,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_title) { TEST(JSONSchema_default_walker_2020_12, metadata_description) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("description", VOCABULARIES_2020_12_METADATA)}; + schema_official_walker("description", VOCABULARIES_2020_12_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -686,7 +686,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_description) { TEST(JSONSchema_default_walker_2020_12, metadata_default) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("default", VOCABULARIES_2020_12_METADATA)}; + schema_official_walker("default", VOCABULARIES_2020_12_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -697,7 +697,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_default) { TEST(JSONSchema_default_walker_2020_12, metadata_deprecated) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("deprecated", VOCABULARIES_2020_12_METADATA)}; + schema_official_walker("deprecated", VOCABULARIES_2020_12_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -708,7 +708,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_deprecated) { TEST(JSONSchema_default_walker_2020_12, metadata_readOnly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readOnly", VOCABULARIES_2020_12_METADATA)}; + schema_official_walker("readOnly", VOCABULARIES_2020_12_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -719,7 +719,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_readOnly) { TEST(JSONSchema_default_walker_2020_12, metadata_writeOnly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("writeOnly", VOCABULARIES_2020_12_METADATA)}; + schema_official_walker("writeOnly", VOCABULARIES_2020_12_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -730,7 +730,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_writeOnly) { TEST(JSONSchema_default_walker_2020_12, metadata_examples) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("examples", VOCABULARIES_2020_12_METADATA)}; + schema_official_walker("examples", VOCABULARIES_2020_12_METADATA)}; EXPECT_EQ(result.type, SchemaKeywordType::Annotation); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -741,7 +741,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_examples) { TEST(JSONSchema_default_walker_2020_12, hyperschema_base) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("base", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("base", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -750,7 +750,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_base) { TEST(JSONSchema_default_walker_2020_12, hyperschema_links) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("links", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("links", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -759,7 +759,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_links) { TEST(JSONSchema_default_walker_2020_12, hyperschema_ref) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("ref", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("ref", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -768,7 +768,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_ref) { TEST(JSONSchema_default_walker_2020_12, hyperschema_href) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("href", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("href", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -777,7 +777,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_href) { TEST(JSONSchema_default_walker_2020_12, hyperschema_anchor) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("anchor", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("anchor", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -785,8 +785,8 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_anchor) { TEST(JSONSchema_default_walker_2020_12, hyperschema_anchorPointer) { using namespace sourcemeta::core; - const auto result{ - default_schema_walker("anchorPointer", VOCABULARIES_2020_12_HYPERSCHEMA)}; + const auto result{schema_official_walker("anchorPointer", + VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -795,7 +795,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_anchorPointer) { TEST(JSONSchema_default_walker_2020_12, hyperschema_rel) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("rel", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("rel", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -803,8 +803,8 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_rel) { TEST(JSONSchema_default_walker_2020_12, hyperschema_templatePointers) { using namespace sourcemeta::core; - const auto result{default_schema_walker("templatePointers", - VOCABULARIES_2020_12_HYPERSCHEMA)}; + const auto result{schema_official_walker("templatePointers", + VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -812,8 +812,8 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_templatePointers) { TEST(JSONSchema_default_walker_2020_12, hyperschema_templateRequired) { using namespace sourcemeta::core; - const auto result{default_schema_walker("templateRequired", - VOCABULARIES_2020_12_HYPERSCHEMA)}; + const auto result{schema_official_walker("templateRequired", + VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -821,8 +821,8 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_templateRequired) { TEST(JSONSchema_default_walker_2020_12, hyperschema_targetMediaType) { using namespace sourcemeta::core; - const auto result{default_schema_walker("targetMediaType", - VOCABULARIES_2020_12_HYPERSCHEMA)}; + const auto result{schema_official_walker("targetMediaType", + VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -831,7 +831,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_targetMediaType) { TEST(JSONSchema_default_walker_2020_12, hyperschema_targetHints) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetHints", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("targetHints", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -839,8 +839,8 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_targetHints) { TEST(JSONSchema_default_walker_2020_12, hyperschema_submissionMediaType) { using namespace sourcemeta::core; - const auto result{default_schema_walker("submissionMediaType", - VOCABULARIES_2020_12_HYPERSCHEMA)}; + const auto result{schema_official_walker("submissionMediaType", + VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -849,7 +849,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_submissionMediaType) { TEST(JSONSchema_default_walker_2020_12, hyperschema_hrefSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("hrefSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("hrefSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -860,7 +860,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_hrefSchema) { TEST(JSONSchema_default_walker_2020_12, hyperschema_targetSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("targetSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -871,7 +871,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_targetSchema) { TEST(JSONSchema_default_walker_2020_12, hyperschema_headerSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("headerSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; + schema_official_walker("headerSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -881,8 +881,8 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_headerSchema) { TEST(JSONSchema_default_walker_2020_12, hyperschema_submissionSchema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("submissionSchema", - VOCABULARIES_2020_12_HYPERSCHEMA)}; + const auto result{schema_official_walker("submissionSchema", + VOCABULARIES_2020_12_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -892,7 +892,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_submissionSchema) { TEST(JSONSchema_default_walker_2020_12, applicator_allOf_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("allOf", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("allOf", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -900,7 +900,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_allOf_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, applicator_anyOf_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("anyOf", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("anyOf", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -908,7 +908,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_anyOf_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, applicator_oneOf_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("oneOf", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("oneOf", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -916,7 +916,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_oneOf_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, applicator_not_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("not", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("not", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -924,7 +924,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_not_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, applicator_if_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("if", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("if", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -932,7 +932,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_if_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, applicator_then_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("then", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("then", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -940,7 +940,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_then_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, applicator_else_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("else", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("else", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -950,7 +950,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_dependentSchemas_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("dependentSchemas", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("dependentSchemas", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -960,7 +960,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_prefixItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("prefixItems", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("prefixItems", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -968,7 +968,7 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, applicator_items_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("items", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("items", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -978,7 +978,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_contains_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contains", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("contains", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -988,7 +988,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_properties_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("properties", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("properties", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -998,7 +998,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_patternProperties_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("patternProperties", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("patternProperties", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1007,8 +1007,8 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, applicator_additionalProperties_without_vocabulary) { using namespace sourcemeta::core; - const auto result{ - default_schema_walker("additionalProperties", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("additionalProperties", + VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1018,7 +1018,7 @@ TEST(JSONSchema_default_walker_2020_12, applicator_propertyNames_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("propertyNames", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("propertyNames", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1028,7 +1028,7 @@ TEST(JSONSchema_default_walker_2020_12, unevaluated_unevaluatedItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("unevaluatedItems", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("unevaluatedItems", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1037,8 +1037,8 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, unevaluated_unevaluatedProperties_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("unevaluatedProperties", - VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("unevaluatedProperties", + VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1046,7 +1046,7 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, validation_type_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("type", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("type", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1054,7 +1054,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_type_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, validation_enum_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enum", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("enum", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1062,7 +1062,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_enum_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, validation_const_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("const", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("const", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1072,7 +1072,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_multipleOf_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("multipleOf", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("multipleOf", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1081,7 +1081,7 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, validation_maximum_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximum", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("maximum", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1090,7 +1090,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maximum_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, validation_minimum_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimum", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("minimum", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1100,7 +1100,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_exclusiveMaximum_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMaximum", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("exclusiveMaximum", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1110,7 +1110,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_exclusiveMinimum_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMinimum", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("exclusiveMinimum", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1120,7 +1120,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maxLength_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxLength", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("maxLength", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1130,7 +1130,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_minLength_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minLength", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("minLength", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1139,7 +1139,7 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, validation_pattern_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pattern", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("pattern", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1149,7 +1149,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maxItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxItems", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("maxItems", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1159,7 +1159,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_minItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minItems", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("minItems", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1169,7 +1169,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_uniqueItems_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("uniqueItems", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("uniqueItems", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1179,7 +1179,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maxContains_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxContains", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("maxContains", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1189,7 +1189,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_minContains_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minContains", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("minContains", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1199,7 +1199,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_maxProperties_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxProperties", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("maxProperties", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1209,7 +1209,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_minProperties_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minProperties", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("minProperties", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1219,7 +1219,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_required_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("required", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("required", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1229,7 +1229,7 @@ TEST(JSONSchema_default_walker_2020_12, validation_dependentRequired_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("dependentRequired", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("dependentRequired", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1238,7 +1238,8 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, format_annotation_format_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_2020_12_CORE)}; + const auto result{ + schema_official_walker("format", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1247,7 +1248,8 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, format_assertion_format_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_2020_12_CORE)}; + const auto result{ + schema_official_walker("format", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1257,7 +1259,7 @@ TEST(JSONSchema_default_walker_2020_12, content_contentEncoding_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentEncoding", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("contentEncoding", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1267,7 +1269,7 @@ TEST(JSONSchema_default_walker_2020_12, content_contentMediaType_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentMediaType", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("contentMediaType", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1277,7 +1279,7 @@ TEST(JSONSchema_default_walker_2020_12, content_contentSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentSchema", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("contentSchema", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1285,7 +1287,7 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, metadata_title_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("title", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("title", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1295,7 +1297,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_description_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("description", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("description", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1304,7 +1306,7 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, metadata_default_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("default", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("default", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1314,7 +1316,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_deprecated_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("deprecated", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("deprecated", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1323,7 +1325,7 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, metadata_readOnly_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readOnly", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("readOnly", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1332,7 +1334,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_readOnly_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, metadata_writeOnly_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("writeOnly", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("writeOnly", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1341,7 +1343,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_writeOnly_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, metadata_examples_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("examples", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("examples", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1349,7 +1351,7 @@ TEST(JSONSchema_default_walker_2020_12, metadata_examples_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, hyperschema_base_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("base", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("base", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1357,7 +1359,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_base_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, hyperschema_links_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("links", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("links", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1365,7 +1367,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_links_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, hyperschema_ref_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("ref", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("ref", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1373,7 +1375,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_ref_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, hyperschema_href_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("href", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("href", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1381,7 +1383,8 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_href_without_vocabulary) { TEST(JSONSchema_default_walker_2020_12, hyperschema_anchor_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("anchor", VOCABULARIES_2020_12_CORE)}; + const auto result{ + schema_official_walker("anchor", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1391,7 +1394,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_anchorPointer_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("anchorPointer", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("anchorPointer", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1399,7 +1402,7 @@ TEST(JSONSchema_default_walker_2020_12, TEST(JSONSchema_default_walker_2020_12, hyperschema_rel_without_vocabulary) { using namespace sourcemeta::core; - const auto result{default_schema_walker("rel", VOCABULARIES_2020_12_CORE)}; + const auto result{schema_official_walker("rel", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1409,7 +1412,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_templatePointers_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("templatePointers", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("templatePointers", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1419,7 +1422,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_templateRequired_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("templateRequired", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("templateRequired", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1429,7 +1432,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_targetMediaType_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetMediaType", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("targetMediaType", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1439,7 +1442,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_targetHints_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetHints", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("targetHints", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1449,7 +1452,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_submissionMediaType_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("submissionMediaType", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("submissionMediaType", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1459,7 +1462,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_hrefSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("hrefSchema", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("hrefSchema", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1469,7 +1472,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_targetSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetSchema", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("targetSchema", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1479,7 +1482,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_headerSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("headerSchema", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("headerSchema", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1489,7 +1492,7 @@ TEST(JSONSchema_default_walker_2020_12, hyperschema_submissionSchema_without_vocabulary) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("submissionSchema", VOCABULARIES_2020_12_CORE)}; + schema_official_walker("submissionSchema", VOCABULARIES_2020_12_CORE)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -1507,7 +1510,7 @@ TEST(JSONSchema_default_walker_2020_12, schema_keyword_priority_array) { VOCABULARIES_2020_12_VALIDATION.cend(), std::inserter(vocabularies, vocabularies.end())); - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("prefixItems", vocabularies, walker), 0); EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); @@ -1527,7 +1530,7 @@ TEST(JSONSchema_default_walker_2020_12, schema_keyword_priority_object) { VOCABULARIES_2020_12_UNEVALUATED.cend(), std::inserter(vocabularies, vocabularies.end())); - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), @@ -1541,7 +1544,7 @@ TEST(JSONSchema_default_walker_2020_12, schema_keyword_priority_object) { TEST(JSONSchema_default_walker_2020_12, schema_keyword_priority_other) { const auto &vocabularies = VOCABULARIES_2020_12_APPLICATOR; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("if", vocabularies, walker), 0); EXPECT_EQ(schema_keyword_priority("then", vocabularies, walker), 1); @@ -1550,7 +1553,7 @@ TEST(JSONSchema_default_walker_2020_12, schema_keyword_priority_other) { TEST(JSONSchema_default_walker_2020_12, schema_keyword_priority_unknown) { const auto &vocabularies = VOCABULARIES_2020_12_CORE; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); } diff --git a/test/jsonschema/jsonschema_default_walker_draft0_test.cc b/test/jsonschema/jsonschema_default_walker_draft0_test.cc index 240cdda6b..e788fe1d3 100644 --- a/test/jsonschema/jsonschema_default_walker_draft0_test.cc +++ b/test/jsonschema/jsonschema_default_walker_draft0_test.cc @@ -9,7 +9,7 @@ static const std::map VOCABULARIES_DRAFT0_HYPERSCHEMA{ TEST(JSONSchema_default_walker_draft0, schema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$schema", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("$schema", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -19,7 +19,7 @@ TEST(JSONSchema_default_walker_draft0, schema) { TEST(JSONSchema_default_walker_draft0, id) { using namespace sourcemeta::core; - const auto result{default_schema_walker("id", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("id", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -29,7 +29,7 @@ TEST(JSONSchema_default_walker_draft0, id) { TEST(JSONSchema_default_walker_draft0, ref) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$ref", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("$ref", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -39,7 +39,7 @@ TEST(JSONSchema_default_walker_draft0, ref) { TEST(JSONSchema_default_walker_draft0, items) { using namespace sourcemeta::core; - const auto result{default_schema_walker("items", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("items", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -49,7 +49,7 @@ TEST(JSONSchema_default_walker_draft0, items) { TEST(JSONSchema_default_walker_draft0, properties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("properties", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("properties", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -60,7 +60,7 @@ TEST(JSONSchema_default_walker_draft0, properties) { TEST(JSONSchema_default_walker_draft0, additionalProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalProperties", VOCABULARIES_DRAFT0)}; + schema_official_walker("additionalProperties", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -71,7 +71,7 @@ TEST(JSONSchema_default_walker_draft0, additionalProperties) { TEST(JSONSchema_default_walker_draft0, type) { using namespace sourcemeta::core; - const auto result{default_schema_walker("type", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("type", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -81,7 +81,7 @@ TEST(JSONSchema_default_walker_draft0, type) { TEST(JSONSchema_default_walker_draft0, enum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enum", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("enum", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -91,7 +91,7 @@ TEST(JSONSchema_default_walker_draft0, enum) { TEST(JSONSchema_default_walker_draft0, maximum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximum", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("maximum", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -101,7 +101,7 @@ TEST(JSONSchema_default_walker_draft0, maximum) { TEST(JSONSchema_default_walker_draft0, minimum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimum", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("minimum", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -112,7 +112,7 @@ TEST(JSONSchema_default_walker_draft0, minimum) { TEST(JSONSchema_default_walker_draft0, maximumCanEqual) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximumCanEqual", VOCABULARIES_DRAFT0)}; + schema_official_walker("maximumCanEqual", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -123,7 +123,7 @@ TEST(JSONSchema_default_walker_draft0, maximumCanEqual) { TEST(JSONSchema_default_walker_draft0, minimumCanEqual) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimumCanEqual", VOCABULARIES_DRAFT0)}; + schema_official_walker("minimumCanEqual", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -133,7 +133,7 @@ TEST(JSONSchema_default_walker_draft0, minimumCanEqual) { TEST(JSONSchema_default_walker_draft0, maxLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxLength", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("maxLength", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -143,7 +143,7 @@ TEST(JSONSchema_default_walker_draft0, maxLength) { TEST(JSONSchema_default_walker_draft0, minLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minLength", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("minLength", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -153,7 +153,7 @@ TEST(JSONSchema_default_walker_draft0, minLength) { TEST(JSONSchema_default_walker_draft0, pattern) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pattern", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("pattern", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -163,7 +163,7 @@ TEST(JSONSchema_default_walker_draft0, pattern) { TEST(JSONSchema_default_walker_draft0, maxItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxItems", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("maxItems", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -173,7 +173,7 @@ TEST(JSONSchema_default_walker_draft0, maxItems) { TEST(JSONSchema_default_walker_draft0, minItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minItems", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("minItems", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -183,7 +183,7 @@ TEST(JSONSchema_default_walker_draft0, minItems) { TEST(JSONSchema_default_walker_draft0, requires) { using namespace sourcemeta::core; - const auto result{default_schema_walker("requires", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("requires", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -193,7 +193,7 @@ TEST(JSONSchema_default_walker_draft0, requires) { TEST(JSONSchema_default_walker_draft0, format) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("format", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -203,7 +203,7 @@ TEST(JSONSchema_default_walker_draft0, format) { TEST(JSONSchema_default_walker_draft0, title) { using namespace sourcemeta::core; - const auto result{default_schema_walker("title", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("title", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -213,7 +213,7 @@ TEST(JSONSchema_default_walker_draft0, title) { TEST(JSONSchema_default_walker_draft0, description) { using namespace sourcemeta::core; - const auto result{default_schema_walker("description", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("description", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -223,7 +223,7 @@ TEST(JSONSchema_default_walker_draft0, description) { TEST(JSONSchema_default_walker_draft0, default) { using namespace sourcemeta::core; - const auto result{default_schema_walker("default", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("default", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -233,7 +233,7 @@ TEST(JSONSchema_default_walker_draft0, default) { TEST(JSONSchema_default_walker_draft0, disallow) { using namespace sourcemeta::core; - const auto result{default_schema_walker("disallow", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("disallow", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -243,7 +243,7 @@ TEST(JSONSchema_default_walker_draft0, disallow) { TEST(JSONSchema_default_walker_draft0, extends) { using namespace sourcemeta::core; - const auto result{default_schema_walker("extends", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("extends", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -254,7 +254,7 @@ TEST(JSONSchema_default_walker_draft0, extends) { TEST(JSONSchema_default_walker_draft0, contentEncoding) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentEncoding", VOCABULARIES_DRAFT0)}; + schema_official_walker("contentEncoding", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -264,7 +264,7 @@ TEST(JSONSchema_default_walker_draft0, contentEncoding) { TEST(JSONSchema_default_walker_draft0, optional) { using namespace sourcemeta::core; - const auto result{default_schema_walker("optional", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("optional", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -274,7 +274,7 @@ TEST(JSONSchema_default_walker_draft0, optional) { TEST(JSONSchema_default_walker_draft0, maxDecimal) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxDecimal", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("maxDecimal", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -285,7 +285,7 @@ TEST(JSONSchema_default_walker_draft0, maxDecimal) { TEST(JSONSchema_default_walker_draft0, hyperschema_links) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("links", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("links", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -293,8 +293,8 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_links) { TEST(JSONSchema_default_walker_draft0, hyperschema_fragmentResolution) { using namespace sourcemeta::core; - const auto result{default_schema_walker("fragmentResolution", - VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + const auto result{schema_official_walker("fragmentResolution", + VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -303,7 +303,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_fragmentResolution) { TEST(JSONSchema_default_walker_draft0, hyperschema_root) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("root", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("root", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -312,7 +312,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_root) { TEST(JSONSchema_default_walker_draft0, hyperschema_readonly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readonly", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("readonly", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -321,7 +321,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_readonly) { TEST(JSONSchema_default_walker_draft0, hyperschema_pathStart) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pathStart", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("pathStart", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -330,7 +330,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_pathStart) { TEST(JSONSchema_default_walker_draft0, hyperschema_mediaType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("mediaType", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("mediaType", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -339,7 +339,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_mediaType) { TEST(JSONSchema_default_walker_draft0, hyperschema_alternate) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("alternate", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("alternate", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -348,7 +348,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_alternate) { TEST(JSONSchema_default_walker_draft0, hyperschema_href) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("href", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("href", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -357,7 +357,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_href) { TEST(JSONSchema_default_walker_draft0, hyperschema_rel) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("rel", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("rel", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -366,7 +366,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_rel) { TEST(JSONSchema_default_walker_draft0, hyperschema_method) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("method", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("method", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -375,7 +375,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_method) { TEST(JSONSchema_default_walker_draft0, hyperschema_enctype) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("enctype", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("enctype", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -384,7 +384,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_enctype) { TEST(JSONSchema_default_walker_draft0, hyperschema_schema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$schema", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("$schema", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -393,7 +393,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_schema) { TEST(JSONSchema_default_walker_draft0, hyperschema_id) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("id", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("id", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -402,7 +402,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_id) { TEST(JSONSchema_default_walker_draft0, hyperschema_ref) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$ref", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("$ref", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -411,7 +411,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_ref) { TEST(JSONSchema_default_walker_draft0, hyperschema_items) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("items", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("items", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -422,7 +422,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_items) { TEST(JSONSchema_default_walker_draft0, hyperschema_properties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("properties", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("properties", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -432,8 +432,8 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_properties) { TEST(JSONSchema_default_walker_draft0, hyperschema_additionalProperties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("additionalProperties", - VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + const auto result{schema_official_walker("additionalProperties", + VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -445,7 +445,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_additionalProperties) { TEST(JSONSchema_default_walker_draft0, hyperschema_type) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("type", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("type", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -456,7 +456,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_type) { TEST(JSONSchema_default_walker_draft0, hyperschema_enum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("enum", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("enum", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -465,7 +465,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_enum) { TEST(JSONSchema_default_walker_draft0, hyperschema_maximum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximum", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("maximum", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -474,7 +474,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_maximum) { TEST(JSONSchema_default_walker_draft0, hyperschema_minimum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimum", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("minimum", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -482,8 +482,8 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_minimum) { TEST(JSONSchema_default_walker_draft0, hyperschema_maximumCanEqual) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximumCanEqual", - VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + const auto result{schema_official_walker("maximumCanEqual", + VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -491,8 +491,8 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_maximumCanEqual) { TEST(JSONSchema_default_walker_draft0, hyperschema_minimumCanEqual) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimumCanEqual", - VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + const auto result{schema_official_walker("minimumCanEqual", + VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -501,7 +501,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_minimumCanEqual) { TEST(JSONSchema_default_walker_draft0, hyperschema_maxLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxLength", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("maxLength", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -510,7 +510,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_maxLength) { TEST(JSONSchema_default_walker_draft0, hyperschema_minLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minLength", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("minLength", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -519,7 +519,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_minLength) { TEST(JSONSchema_default_walker_draft0, hyperschema_pattern) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pattern", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("pattern", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -528,7 +528,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_pattern) { TEST(JSONSchema_default_walker_draft0, hyperschema_maxItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxItems", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("maxItems", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -537,7 +537,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_maxItems) { TEST(JSONSchema_default_walker_draft0, hyperschema_minItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minItems", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("minItems", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -546,7 +546,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_minItems) { TEST(JSONSchema_default_walker_draft0, hyperschema_requires) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("requires", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("requires", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -557,7 +557,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_requires) { TEST(JSONSchema_default_walker_draft0, hyperschema_format) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("format", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("format", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -566,7 +566,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_format) { TEST(JSONSchema_default_walker_draft0, hyperschema_title) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("title", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("title", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -575,7 +575,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_title) { TEST(JSONSchema_default_walker_draft0, hyperschema_description) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("description", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("description", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -584,7 +584,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_description) { TEST(JSONSchema_default_walker_draft0, hyperschema_default) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("default", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("default", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -593,7 +593,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_default) { TEST(JSONSchema_default_walker_draft0, hyperschema_disallow) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("disallow", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("disallow", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -602,7 +602,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_disallow) { TEST(JSONSchema_default_walker_draft0, hyperschema_extends) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("extends", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("extends", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -612,8 +612,8 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_extends) { TEST(JSONSchema_default_walker_draft0, hyperschema_contentEncoding) { using namespace sourcemeta::core; - const auto result{default_schema_walker("contentEncoding", - VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + const auto result{schema_official_walker("contentEncoding", + VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -622,7 +622,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_contentEncoding) { TEST(JSONSchema_default_walker_draft0, hyperschema_optional) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("optional", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("optional", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -631,7 +631,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_optional) { TEST(JSONSchema_default_walker_draft0, hyperschema_maxDecimal) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxDecimal", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; + schema_official_walker("maxDecimal", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -639,7 +639,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_maxDecimal) { TEST(JSONSchema_default_walker_draft0, hyperschema_links_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("links", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("links", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -649,7 +649,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_fragmentResolution_without_hyperchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("fragmentResolution", VOCABULARIES_DRAFT0)}; + schema_official_walker("fragmentResolution", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -657,7 +657,7 @@ TEST(JSONSchema_default_walker_draft0, TEST(JSONSchema_default_walker_draft0, hyperschema_root_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("root", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("root", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -666,7 +666,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_root_without_hyperschema) { TEST(JSONSchema_default_walker_draft0, hyperschema_readonly_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("readonly", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("readonly", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -675,7 +675,7 @@ TEST(JSONSchema_default_walker_draft0, TEST(JSONSchema_default_walker_draft0, hyperschema_pathStart_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pathStart", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("pathStart", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -684,7 +684,7 @@ TEST(JSONSchema_default_walker_draft0, TEST(JSONSchema_default_walker_draft0, hyperschema_mediaType_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("mediaType", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("mediaType", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -693,7 +693,7 @@ TEST(JSONSchema_default_walker_draft0, TEST(JSONSchema_default_walker_draft0, hyperschema_alternate_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("alternate", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("alternate", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -701,7 +701,7 @@ TEST(JSONSchema_default_walker_draft0, TEST(JSONSchema_default_walker_draft0, hyperschema_href_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("href", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("href", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -709,7 +709,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_href_without_hyperschema) { TEST(JSONSchema_default_walker_draft0, hyperschema_rel_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("rel", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("rel", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -717,7 +717,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_rel_without_hyperschema) { TEST(JSONSchema_default_walker_draft0, hyperschema_method_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("method", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("method", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -726,7 +726,7 @@ TEST(JSONSchema_default_walker_draft0, hyperschema_method_without_hyperschema) { TEST(JSONSchema_default_walker_draft0, hyperschema_enctype_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enctype", VOCABULARIES_DRAFT0)}; + const auto result{schema_official_walker("enctype", VOCABULARIES_DRAFT0)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -734,7 +734,7 @@ TEST(JSONSchema_default_walker_draft0, TEST(JSONSchema_default_walker_draft0, schema_keyword_priority_object) { const auto &vocabularies = VOCABULARIES_DRAFT0; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); EXPECT_EQ( @@ -743,7 +743,7 @@ TEST(JSONSchema_default_walker_draft0, schema_keyword_priority_object) { TEST(JSONSchema_default_walker_draft0, schema_keyword_priority_unknown) { const auto &vocabularies = VOCABULARIES_DRAFT0; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); } diff --git a/test/jsonschema/jsonschema_default_walker_draft1_test.cc b/test/jsonschema/jsonschema_default_walker_draft1_test.cc index 5ec8f5da6..a900ba3fc 100644 --- a/test/jsonschema/jsonschema_default_walker_draft1_test.cc +++ b/test/jsonschema/jsonschema_default_walker_draft1_test.cc @@ -9,7 +9,7 @@ static const std::map VOCABULARIES_DRAFT1_HYPERSCHEMA{ TEST(JSONSchema_default_walker_draft1, schema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$schema", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("$schema", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -19,7 +19,7 @@ TEST(JSONSchema_default_walker_draft1, schema) { TEST(JSONSchema_default_walker_draft1, id) { using namespace sourcemeta::core; - const auto result{default_schema_walker("id", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("id", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -29,7 +29,7 @@ TEST(JSONSchema_default_walker_draft1, id) { TEST(JSONSchema_default_walker_draft1, ref) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$ref", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("$ref", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -39,7 +39,7 @@ TEST(JSONSchema_default_walker_draft1, ref) { TEST(JSONSchema_default_walker_draft1, items) { using namespace sourcemeta::core; - const auto result{default_schema_walker("items", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("items", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -49,7 +49,7 @@ TEST(JSONSchema_default_walker_draft1, items) { TEST(JSONSchema_default_walker_draft1, properties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("properties", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("properties", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -60,7 +60,7 @@ TEST(JSONSchema_default_walker_draft1, properties) { TEST(JSONSchema_default_walker_draft1, additionalProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalProperties", VOCABULARIES_DRAFT1)}; + schema_official_walker("additionalProperties", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -71,7 +71,7 @@ TEST(JSONSchema_default_walker_draft1, additionalProperties) { TEST(JSONSchema_default_walker_draft1, type) { using namespace sourcemeta::core; - const auto result{default_schema_walker("type", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("type", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -81,7 +81,7 @@ TEST(JSONSchema_default_walker_draft1, type) { TEST(JSONSchema_default_walker_draft1, enum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enum", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("enum", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -91,7 +91,7 @@ TEST(JSONSchema_default_walker_draft1, enum) { TEST(JSONSchema_default_walker_draft1, maximum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximum", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("maximum", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -101,7 +101,7 @@ TEST(JSONSchema_default_walker_draft1, maximum) { TEST(JSONSchema_default_walker_draft1, minimum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimum", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("minimum", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -112,7 +112,7 @@ TEST(JSONSchema_default_walker_draft1, minimum) { TEST(JSONSchema_default_walker_draft1, maximumCanEqual) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximumCanEqual", VOCABULARIES_DRAFT1)}; + schema_official_walker("maximumCanEqual", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -123,7 +123,7 @@ TEST(JSONSchema_default_walker_draft1, maximumCanEqual) { TEST(JSONSchema_default_walker_draft1, minimumCanEqual) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimumCanEqual", VOCABULARIES_DRAFT1)}; + schema_official_walker("minimumCanEqual", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -133,7 +133,7 @@ TEST(JSONSchema_default_walker_draft1, minimumCanEqual) { TEST(JSONSchema_default_walker_draft1, maxLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxLength", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("maxLength", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -143,7 +143,7 @@ TEST(JSONSchema_default_walker_draft1, maxLength) { TEST(JSONSchema_default_walker_draft1, minLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minLength", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("minLength", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -153,7 +153,7 @@ TEST(JSONSchema_default_walker_draft1, minLength) { TEST(JSONSchema_default_walker_draft1, pattern) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pattern", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("pattern", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -163,7 +163,7 @@ TEST(JSONSchema_default_walker_draft1, pattern) { TEST(JSONSchema_default_walker_draft1, maxItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxItems", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("maxItems", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -173,7 +173,7 @@ TEST(JSONSchema_default_walker_draft1, maxItems) { TEST(JSONSchema_default_walker_draft1, minItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minItems", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("minItems", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -183,7 +183,7 @@ TEST(JSONSchema_default_walker_draft1, minItems) { TEST(JSONSchema_default_walker_draft1, requires) { using namespace sourcemeta::core; - const auto result{default_schema_walker("requires", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("requires", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -193,7 +193,7 @@ TEST(JSONSchema_default_walker_draft1, requires) { TEST(JSONSchema_default_walker_draft1, format) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("format", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -203,7 +203,7 @@ TEST(JSONSchema_default_walker_draft1, format) { TEST(JSONSchema_default_walker_draft1, title) { using namespace sourcemeta::core; - const auto result{default_schema_walker("title", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("title", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -213,7 +213,7 @@ TEST(JSONSchema_default_walker_draft1, title) { TEST(JSONSchema_default_walker_draft1, description) { using namespace sourcemeta::core; - const auto result{default_schema_walker("description", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("description", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -223,7 +223,7 @@ TEST(JSONSchema_default_walker_draft1, description) { TEST(JSONSchema_default_walker_draft1, default) { using namespace sourcemeta::core; - const auto result{default_schema_walker("default", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("default", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -233,7 +233,7 @@ TEST(JSONSchema_default_walker_draft1, default) { TEST(JSONSchema_default_walker_draft1, disallow) { using namespace sourcemeta::core; - const auto result{default_schema_walker("disallow", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("disallow", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -243,7 +243,7 @@ TEST(JSONSchema_default_walker_draft1, disallow) { TEST(JSONSchema_default_walker_draft1, extends) { using namespace sourcemeta::core; - const auto result{default_schema_walker("extends", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("extends", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -254,7 +254,7 @@ TEST(JSONSchema_default_walker_draft1, extends) { TEST(JSONSchema_default_walker_draft1, contentEncoding) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentEncoding", VOCABULARIES_DRAFT1)}; + schema_official_walker("contentEncoding", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -264,7 +264,7 @@ TEST(JSONSchema_default_walker_draft1, contentEncoding) { TEST(JSONSchema_default_walker_draft1, optional) { using namespace sourcemeta::core; - const auto result{default_schema_walker("optional", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("optional", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -274,7 +274,7 @@ TEST(JSONSchema_default_walker_draft1, optional) { TEST(JSONSchema_default_walker_draft1, maxDecimal) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxDecimal", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("maxDecimal", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -285,7 +285,7 @@ TEST(JSONSchema_default_walker_draft1, maxDecimal) { TEST(JSONSchema_default_walker_draft1, hyperschema_links) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("links", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("links", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -293,8 +293,8 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_links) { TEST(JSONSchema_default_walker_draft1, hyperschema_fragmentResolution) { using namespace sourcemeta::core; - const auto result{default_schema_walker("fragmentResolution", - VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + const auto result{schema_official_walker("fragmentResolution", + VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -303,7 +303,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_fragmentResolution) { TEST(JSONSchema_default_walker_draft1, hyperschema_root) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("root", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("root", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -312,7 +312,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_root) { TEST(JSONSchema_default_walker_draft1, hyperschema_readonly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readonly", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("readonly", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -321,7 +321,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_readonly) { TEST(JSONSchema_default_walker_draft1, hyperschema_pathStart) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pathStart", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("pathStart", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -330,7 +330,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_pathStart) { TEST(JSONSchema_default_walker_draft1, hyperschema_mediaType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("mediaType", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("mediaType", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -339,7 +339,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_mediaType) { TEST(JSONSchema_default_walker_draft1, hyperschema_alternate) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("alternate", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("alternate", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -348,7 +348,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_alternate) { TEST(JSONSchema_default_walker_draft1, hyperschema_href) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("href", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("href", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -357,7 +357,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_href) { TEST(JSONSchema_default_walker_draft1, hyperschema_rel) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("rel", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("rel", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -366,7 +366,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_rel) { TEST(JSONSchema_default_walker_draft1, hyperschema_method) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("method", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("method", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -375,7 +375,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_method) { TEST(JSONSchema_default_walker_draft1, hyperschema_enctype) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("enctype", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("enctype", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -384,7 +384,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_enctype) { TEST(JSONSchema_default_walker_draft1, hyperschema_schema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$schema", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("$schema", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -393,7 +393,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_schema) { TEST(JSONSchema_default_walker_draft1, hyperschema_id) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("id", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("id", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -402,7 +402,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_id) { TEST(JSONSchema_default_walker_draft1, hyperschema_ref) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$ref", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("$ref", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -411,7 +411,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_ref) { TEST(JSONSchema_default_walker_draft1, hyperschema_items) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("items", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("items", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -422,7 +422,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_items) { TEST(JSONSchema_default_walker_draft1, hyperschema_properties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("properties", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("properties", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -432,8 +432,8 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_properties) { TEST(JSONSchema_default_walker_draft1, hyperschema_additionalProperties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("additionalProperties", - VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + const auto result{schema_official_walker("additionalProperties", + VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -445,7 +445,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_additionalProperties) { TEST(JSONSchema_default_walker_draft1, hyperschema_type) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("type", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("type", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -456,7 +456,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_type) { TEST(JSONSchema_default_walker_draft1, hyperschema_enum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("enum", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("enum", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -465,7 +465,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_enum) { TEST(JSONSchema_default_walker_draft1, hyperschema_maximum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximum", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("maximum", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -474,7 +474,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_maximum) { TEST(JSONSchema_default_walker_draft1, hyperschema_minimum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimum", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("minimum", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -482,8 +482,8 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_minimum) { TEST(JSONSchema_default_walker_draft1, hyperschema_maximumCanEqual) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximumCanEqual", - VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + const auto result{schema_official_walker("maximumCanEqual", + VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -491,8 +491,8 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_maximumCanEqual) { TEST(JSONSchema_default_walker_draft1, hyperschema_minimumCanEqual) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimumCanEqual", - VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + const auto result{schema_official_walker("minimumCanEqual", + VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -501,7 +501,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_minimumCanEqual) { TEST(JSONSchema_default_walker_draft1, hyperschema_maxLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxLength", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("maxLength", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -510,7 +510,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_maxLength) { TEST(JSONSchema_default_walker_draft1, hyperschema_minLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minLength", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("minLength", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -519,7 +519,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_minLength) { TEST(JSONSchema_default_walker_draft1, hyperschema_pattern) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pattern", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("pattern", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -528,7 +528,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_pattern) { TEST(JSONSchema_default_walker_draft1, hyperschema_maxItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxItems", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("maxItems", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -537,7 +537,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_maxItems) { TEST(JSONSchema_default_walker_draft1, hyperschema_minItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minItems", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("minItems", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -546,7 +546,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_minItems) { TEST(JSONSchema_default_walker_draft1, hyperschema_requires) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("requires", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("requires", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -557,7 +557,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_requires) { TEST(JSONSchema_default_walker_draft1, hyperschema_format) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("format", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("format", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -566,7 +566,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_format) { TEST(JSONSchema_default_walker_draft1, hyperschema_title) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("title", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("title", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -575,7 +575,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_title) { TEST(JSONSchema_default_walker_draft1, hyperschema_description) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("description", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("description", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -584,7 +584,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_description) { TEST(JSONSchema_default_walker_draft1, hyperschema_default) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("default", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("default", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -593,7 +593,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_default) { TEST(JSONSchema_default_walker_draft1, hyperschema_disallow) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("disallow", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("disallow", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -602,7 +602,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_disallow) { TEST(JSONSchema_default_walker_draft1, hyperschema_extends) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("extends", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("extends", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -612,8 +612,8 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_extends) { TEST(JSONSchema_default_walker_draft1, hyperschema_contentEncoding) { using namespace sourcemeta::core; - const auto result{default_schema_walker("contentEncoding", - VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + const auto result{schema_official_walker("contentEncoding", + VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -622,7 +622,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_contentEncoding) { TEST(JSONSchema_default_walker_draft1, hyperschema_optional) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("optional", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("optional", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -631,7 +631,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_optional) { TEST(JSONSchema_default_walker_draft1, hyperschema_maxDecimal) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxDecimal", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; + schema_official_walker("maxDecimal", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -639,7 +639,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_maxDecimal) { TEST(JSONSchema_default_walker_draft1, hyperschema_links_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("links", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("links", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -649,7 +649,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_fragmentResolution_without_hyperchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("fragmentResolution", VOCABULARIES_DRAFT1)}; + schema_official_walker("fragmentResolution", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -657,7 +657,7 @@ TEST(JSONSchema_default_walker_draft1, TEST(JSONSchema_default_walker_draft1, hyperschema_root_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("root", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("root", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -666,7 +666,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_root_without_hyperschema) { TEST(JSONSchema_default_walker_draft1, hyperschema_readonly_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("readonly", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("readonly", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -675,7 +675,7 @@ TEST(JSONSchema_default_walker_draft1, TEST(JSONSchema_default_walker_draft1, hyperschema_pathStart_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pathStart", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("pathStart", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -684,7 +684,7 @@ TEST(JSONSchema_default_walker_draft1, TEST(JSONSchema_default_walker_draft1, hyperschema_mediaType_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("mediaType", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("mediaType", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -693,7 +693,7 @@ TEST(JSONSchema_default_walker_draft1, TEST(JSONSchema_default_walker_draft1, hyperschema_alternate_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("alternate", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("alternate", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -701,7 +701,7 @@ TEST(JSONSchema_default_walker_draft1, TEST(JSONSchema_default_walker_draft1, hyperschema_href_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("href", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("href", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -709,7 +709,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_href_without_hyperschema) { TEST(JSONSchema_default_walker_draft1, hyperschema_rel_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("rel", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("rel", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -717,7 +717,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_rel_without_hyperschema) { TEST(JSONSchema_default_walker_draft1, hyperschema_method_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("method", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("method", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -726,7 +726,7 @@ TEST(JSONSchema_default_walker_draft1, hyperschema_method_without_hyperschema) { TEST(JSONSchema_default_walker_draft1, hyperschema_enctype_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enctype", VOCABULARIES_DRAFT1)}; + const auto result{schema_official_walker("enctype", VOCABULARIES_DRAFT1)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -734,7 +734,7 @@ TEST(JSONSchema_default_walker_draft1, TEST(JSONSchema_default_walker_draft1, schema_keyword_priority_object) { const auto &vocabularies = VOCABULARIES_DRAFT1; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); EXPECT_EQ( @@ -743,7 +743,7 @@ TEST(JSONSchema_default_walker_draft1, schema_keyword_priority_object) { TEST(JSONSchema_default_walker_draft1, schema_keyword_priority_unknown) { const auto &vocabularies = VOCABULARIES_DRAFT1; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); } diff --git a/test/jsonschema/jsonschema_default_walker_draft2_test.cc b/test/jsonschema/jsonschema_default_walker_draft2_test.cc index 8f3753eb8..9240c2370 100644 --- a/test/jsonschema/jsonschema_default_walker_draft2_test.cc +++ b/test/jsonschema/jsonschema_default_walker_draft2_test.cc @@ -9,7 +9,7 @@ static const std::map VOCABULARIES_DRAFT2_HYPERSCHEMA{ TEST(JSONSchema_default_walker_draft2, schema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$schema", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("$schema", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -19,7 +19,7 @@ TEST(JSONSchema_default_walker_draft2, schema) { TEST(JSONSchema_default_walker_draft2, id) { using namespace sourcemeta::core; - const auto result{default_schema_walker("id", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("id", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -29,7 +29,7 @@ TEST(JSONSchema_default_walker_draft2, id) { TEST(JSONSchema_default_walker_draft2, ref) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$ref", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("$ref", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -39,7 +39,7 @@ TEST(JSONSchema_default_walker_draft2, ref) { TEST(JSONSchema_default_walker_draft2, items) { using namespace sourcemeta::core; - const auto result{default_schema_walker("items", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("items", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -49,7 +49,7 @@ TEST(JSONSchema_default_walker_draft2, items) { TEST(JSONSchema_default_walker_draft2, properties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("properties", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("properties", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -60,7 +60,7 @@ TEST(JSONSchema_default_walker_draft2, properties) { TEST(JSONSchema_default_walker_draft2, additionalProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalProperties", VOCABULARIES_DRAFT2)}; + schema_official_walker("additionalProperties", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -71,7 +71,7 @@ TEST(JSONSchema_default_walker_draft2, additionalProperties) { TEST(JSONSchema_default_walker_draft2, type) { using namespace sourcemeta::core; - const auto result{default_schema_walker("type", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("type", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -81,7 +81,7 @@ TEST(JSONSchema_default_walker_draft2, type) { TEST(JSONSchema_default_walker_draft2, enum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enum", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("enum", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -91,7 +91,7 @@ TEST(JSONSchema_default_walker_draft2, enum) { TEST(JSONSchema_default_walker_draft2, maximum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximum", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("maximum", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -101,7 +101,7 @@ TEST(JSONSchema_default_walker_draft2, maximum) { TEST(JSONSchema_default_walker_draft2, minimum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimum", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("minimum", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -112,7 +112,7 @@ TEST(JSONSchema_default_walker_draft2, minimum) { TEST(JSONSchema_default_walker_draft2, maximumCanEqual) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximumCanEqual", VOCABULARIES_DRAFT2)}; + schema_official_walker("maximumCanEqual", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -123,7 +123,7 @@ TEST(JSONSchema_default_walker_draft2, maximumCanEqual) { TEST(JSONSchema_default_walker_draft2, minimumCanEqual) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimumCanEqual", VOCABULARIES_DRAFT2)}; + schema_official_walker("minimumCanEqual", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -133,7 +133,7 @@ TEST(JSONSchema_default_walker_draft2, minimumCanEqual) { TEST(JSONSchema_default_walker_draft2, maxLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxLength", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("maxLength", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -143,7 +143,7 @@ TEST(JSONSchema_default_walker_draft2, maxLength) { TEST(JSONSchema_default_walker_draft2, minLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minLength", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("minLength", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -153,7 +153,7 @@ TEST(JSONSchema_default_walker_draft2, minLength) { TEST(JSONSchema_default_walker_draft2, pattern) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pattern", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("pattern", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -163,7 +163,7 @@ TEST(JSONSchema_default_walker_draft2, pattern) { TEST(JSONSchema_default_walker_draft2, maxItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxItems", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("maxItems", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -173,7 +173,7 @@ TEST(JSONSchema_default_walker_draft2, maxItems) { TEST(JSONSchema_default_walker_draft2, minItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minItems", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("minItems", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -183,7 +183,7 @@ TEST(JSONSchema_default_walker_draft2, minItems) { TEST(JSONSchema_default_walker_draft2, uniqueItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("uniqueItems", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("uniqueItems", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -193,7 +193,7 @@ TEST(JSONSchema_default_walker_draft2, uniqueItems) { TEST(JSONSchema_default_walker_draft2, requires) { using namespace sourcemeta::core; - const auto result{default_schema_walker("requires", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("requires", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -203,7 +203,7 @@ TEST(JSONSchema_default_walker_draft2, requires) { TEST(JSONSchema_default_walker_draft2, format) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("format", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -213,7 +213,7 @@ TEST(JSONSchema_default_walker_draft2, format) { TEST(JSONSchema_default_walker_draft2, title) { using namespace sourcemeta::core; - const auto result{default_schema_walker("title", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("title", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -223,7 +223,7 @@ TEST(JSONSchema_default_walker_draft2, title) { TEST(JSONSchema_default_walker_draft2, description) { using namespace sourcemeta::core; - const auto result{default_schema_walker("description", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("description", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -233,7 +233,7 @@ TEST(JSONSchema_default_walker_draft2, description) { TEST(JSONSchema_default_walker_draft2, default) { using namespace sourcemeta::core; - const auto result{default_schema_walker("default", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("default", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -243,7 +243,7 @@ TEST(JSONSchema_default_walker_draft2, default) { TEST(JSONSchema_default_walker_draft2, divisibleBy) { using namespace sourcemeta::core; - const auto result{default_schema_walker("divisibleBy", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("divisibleBy", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -253,7 +253,7 @@ TEST(JSONSchema_default_walker_draft2, divisibleBy) { TEST(JSONSchema_default_walker_draft2, disallow) { using namespace sourcemeta::core; - const auto result{default_schema_walker("disallow", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("disallow", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -263,7 +263,7 @@ TEST(JSONSchema_default_walker_draft2, disallow) { TEST(JSONSchema_default_walker_draft2, extends) { using namespace sourcemeta::core; - const auto result{default_schema_walker("extends", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("extends", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -274,7 +274,7 @@ TEST(JSONSchema_default_walker_draft2, extends) { TEST(JSONSchema_default_walker_draft2, contentEncoding) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentEncoding", VOCABULARIES_DRAFT2)}; + schema_official_walker("contentEncoding", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -285,7 +285,7 @@ TEST(JSONSchema_default_walker_draft2, contentEncoding) { TEST(JSONSchema_default_walker_draft2, hyperschema_links) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("links", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("links", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -293,8 +293,8 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_links) { TEST(JSONSchema_default_walker_draft2, hyperschema_fragmentResolution) { using namespace sourcemeta::core; - const auto result{default_schema_walker("fragmentResolution", - VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + const auto result{schema_official_walker("fragmentResolution", + VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -303,7 +303,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_fragmentResolution) { TEST(JSONSchema_default_walker_draft2, hyperschema_root) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("root", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("root", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -312,7 +312,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_root) { TEST(JSONSchema_default_walker_draft2, hyperschema_readonly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readonly", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("readonly", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -321,7 +321,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_readonly) { TEST(JSONSchema_default_walker_draft2, hyperschema_pathStart) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pathStart", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("pathStart", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -330,7 +330,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_pathStart) { TEST(JSONSchema_default_walker_draft2, hyperschema_mediaType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("mediaType", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("mediaType", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -339,7 +339,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_mediaType) { TEST(JSONSchema_default_walker_draft2, hyperschema_alternate) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("alternate", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("alternate", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -348,7 +348,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_alternate) { TEST(JSONSchema_default_walker_draft2, hyperschema_href) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("href", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("href", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -357,7 +357,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_href) { TEST(JSONSchema_default_walker_draft2, hyperschema_rel) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("rel", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("rel", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -366,7 +366,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_rel) { TEST(JSONSchema_default_walker_draft2, hyperschema_method) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("method", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("method", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -375,7 +375,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_method) { TEST(JSONSchema_default_walker_draft2, hyperschema_enctype) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("enctype", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("enctype", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -384,7 +384,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_enctype) { TEST(JSONSchema_default_walker_draft2, hyperschema_targetSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetSchema", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("targetSchema", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -394,7 +394,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_targetSchema) { TEST(JSONSchema_default_walker_draft2, hyperschema_links_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("links", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("links", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -403,7 +403,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_links_without_hyperschema) { TEST(JSONSchema_default_walker_draft2, hyperschema_schema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$schema", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("$schema", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -412,7 +412,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_schema) { TEST(JSONSchema_default_walker_draft2, hyperschema_id) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("id", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("id", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -421,7 +421,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_id) { TEST(JSONSchema_default_walker_draft2, hyperschema_ref) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("$ref", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("$ref", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -430,7 +430,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_ref) { TEST(JSONSchema_default_walker_draft2, hyperschema_items) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("items", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("items", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -441,7 +441,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_items) { TEST(JSONSchema_default_walker_draft2, hyperschema_properties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("properties", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("properties", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -451,8 +451,8 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_properties) { TEST(JSONSchema_default_walker_draft2, hyperschema_additionalProperties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("additionalProperties", - VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + const auto result{schema_official_walker("additionalProperties", + VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -464,7 +464,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_additionalProperties) { TEST(JSONSchema_default_walker_draft2, hyperschema_type) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("type", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("type", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -475,7 +475,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_type) { TEST(JSONSchema_default_walker_draft2, hyperschema_enum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("enum", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("enum", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -484,7 +484,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_enum) { TEST(JSONSchema_default_walker_draft2, hyperschema_maximum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maximum", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("maximum", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -493,7 +493,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_maximum) { TEST(JSONSchema_default_walker_draft2, hyperschema_minimum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minimum", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("minimum", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -501,8 +501,8 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_minimum) { TEST(JSONSchema_default_walker_draft2, hyperschema_maximumCanEqual) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximumCanEqual", - VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + const auto result{schema_official_walker("maximumCanEqual", + VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -510,8 +510,8 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_maximumCanEqual) { TEST(JSONSchema_default_walker_draft2, hyperschema_minimumCanEqual) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimumCanEqual", - VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + const auto result{schema_official_walker("minimumCanEqual", + VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -520,7 +520,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_minimumCanEqual) { TEST(JSONSchema_default_walker_draft2, hyperschema_maxLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxLength", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("maxLength", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -529,7 +529,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_maxLength) { TEST(JSONSchema_default_walker_draft2, hyperschema_minLength) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minLength", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("minLength", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -538,7 +538,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_minLength) { TEST(JSONSchema_default_walker_draft2, hyperschema_pattern) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pattern", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("pattern", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -547,7 +547,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_pattern) { TEST(JSONSchema_default_walker_draft2, hyperschema_maxItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxItems", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("maxItems", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -556,7 +556,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_maxItems) { TEST(JSONSchema_default_walker_draft2, hyperschema_minItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minItems", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("minItems", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -565,7 +565,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_minItems) { TEST(JSONSchema_default_walker_draft2, hyperschema_uniqueItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("uniqueItems", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("uniqueItems", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -574,7 +574,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_uniqueItems) { TEST(JSONSchema_default_walker_draft2, hyperschema_requires) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("requires", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("requires", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -585,7 +585,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_requires) { TEST(JSONSchema_default_walker_draft2, hyperschema_format) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("format", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("format", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -594,7 +594,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_format) { TEST(JSONSchema_default_walker_draft2, hyperschema_title) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("title", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("title", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -603,7 +603,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_title) { TEST(JSONSchema_default_walker_draft2, hyperschema_description) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("description", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("description", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -612,7 +612,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_description) { TEST(JSONSchema_default_walker_draft2, hyperschema_default) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("default", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("default", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -621,7 +621,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_default) { TEST(JSONSchema_default_walker_draft2, hyperschema_divisibleBy) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("divisibleBy", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("divisibleBy", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -630,7 +630,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_divisibleBy) { TEST(JSONSchema_default_walker_draft2, hyperschema_disallow) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("disallow", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("disallow", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -639,7 +639,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_disallow) { TEST(JSONSchema_default_walker_draft2, hyperschema_extends) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("extends", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + schema_official_walker("extends", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -649,8 +649,8 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_extends) { TEST(JSONSchema_default_walker_draft2, hyperschema_contentEncoding) { using namespace sourcemeta::core; - const auto result{default_schema_walker("contentEncoding", - VOCABULARIES_DRAFT2_HYPERSCHEMA)}; + const auto result{schema_official_walker("contentEncoding", + VOCABULARIES_DRAFT2_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -660,7 +660,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_fragmentResolution_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("fragmentResolution", VOCABULARIES_DRAFT2)}; + schema_official_walker("fragmentResolution", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -668,7 +668,7 @@ TEST(JSONSchema_default_walker_draft2, TEST(JSONSchema_default_walker_draft2, hyperschema_root_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("root", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("root", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -677,7 +677,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_root_without_hyperschema) { TEST(JSONSchema_default_walker_draft2, hyperschema_readonly_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("readonly", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("readonly", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -686,7 +686,7 @@ TEST(JSONSchema_default_walker_draft2, TEST(JSONSchema_default_walker_draft2, hyperschema_pathStart_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pathStart", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("pathStart", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -695,7 +695,7 @@ TEST(JSONSchema_default_walker_draft2, TEST(JSONSchema_default_walker_draft2, hyperschema_mediaType_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("mediaType", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("mediaType", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -704,7 +704,7 @@ TEST(JSONSchema_default_walker_draft2, TEST(JSONSchema_default_walker_draft2, hyperschema_alternate_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("alternate", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("alternate", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -712,7 +712,7 @@ TEST(JSONSchema_default_walker_draft2, TEST(JSONSchema_default_walker_draft2, hyperschema_href_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("href", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("href", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -720,7 +720,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_href_without_hyperschema) { TEST(JSONSchema_default_walker_draft2, hyperschema_rel_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("rel", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("rel", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -728,7 +728,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_rel_without_hyperschema) { TEST(JSONSchema_default_walker_draft2, hyperschema_method_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("method", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("method", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -737,7 +737,7 @@ TEST(JSONSchema_default_walker_draft2, hyperschema_method_without_hyperschema) { TEST(JSONSchema_default_walker_draft2, hyperschema_enctype_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enctype", VOCABULARIES_DRAFT2)}; + const auto result{schema_official_walker("enctype", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -746,7 +746,8 @@ TEST(JSONSchema_default_walker_draft2, TEST(JSONSchema_default_walker_draft2, hyperschema_targetSchema_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("targetSchema", VOCABULARIES_DRAFT2)}; + const auto result{ + schema_official_walker("targetSchema", VOCABULARIES_DRAFT2)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -754,7 +755,7 @@ TEST(JSONSchema_default_walker_draft2, TEST(JSONSchema_default_walker_draft2, schema_keyword_priority_object) { const auto &vocabularies = VOCABULARIES_DRAFT2; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); EXPECT_EQ( @@ -763,7 +764,7 @@ TEST(JSONSchema_default_walker_draft2, schema_keyword_priority_object) { TEST(JSONSchema_default_walker_draft2, schema_keyword_priority_unknown) { const auto &vocabularies = VOCABULARIES_DRAFT2; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); } diff --git a/test/jsonschema/jsonschema_default_walker_draft3_test.cc b/test/jsonschema/jsonschema_default_walker_draft3_test.cc index 3d7d00c9d..2930ac78e 100644 --- a/test/jsonschema/jsonschema_default_walker_draft3_test.cc +++ b/test/jsonschema/jsonschema_default_walker_draft3_test.cc @@ -9,7 +9,7 @@ static const std::map VOCABULARIES_DRAFT3_HYPERSCHEMA{ TEST(JSONSchema_default_walker_draft3, schema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$schema", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("$schema", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -20,7 +20,7 @@ TEST(JSONSchema_default_walker_draft3, schema) { TEST(JSONSchema_default_walker_draft3, id) { using namespace sourcemeta::core; - const auto result{default_schema_walker("id", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("id", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -31,7 +31,7 @@ TEST(JSONSchema_default_walker_draft3, id) { TEST(JSONSchema_default_walker_draft3, ref) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$ref", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("$ref", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -41,7 +41,7 @@ TEST(JSONSchema_default_walker_draft3, ref) { TEST(JSONSchema_default_walker_draft3, items) { using namespace sourcemeta::core; - const auto result{default_schema_walker("items", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("items", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -53,7 +53,7 @@ TEST(JSONSchema_default_walker_draft3, items) { TEST(JSONSchema_default_walker_draft3, additionalItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalItems", VOCABULARIES_DRAFT3)}; + schema_official_walker("additionalItems", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -64,7 +64,7 @@ TEST(JSONSchema_default_walker_draft3, additionalItems) { TEST(JSONSchema_default_walker_draft3, properties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("properties", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("properties", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -76,7 +76,7 @@ TEST(JSONSchema_default_walker_draft3, properties) { TEST(JSONSchema_default_walker_draft3, patternProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("patternProperties", VOCABULARIES_DRAFT3)}; + schema_official_walker("patternProperties", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -87,7 +87,8 @@ TEST(JSONSchema_default_walker_draft3, patternProperties) { TEST(JSONSchema_default_walker_draft3, dependencies) { using namespace sourcemeta::core; - const auto result{default_schema_walker("dependencies", VOCABULARIES_DRAFT3)}; + const auto result{ + schema_official_walker("dependencies", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -99,7 +100,7 @@ TEST(JSONSchema_default_walker_draft3, dependencies) { TEST(JSONSchema_default_walker_draft3, additionalProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalProperties", VOCABULARIES_DRAFT3)}; + schema_official_walker("additionalProperties", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -110,7 +111,7 @@ TEST(JSONSchema_default_walker_draft3, additionalProperties) { TEST(JSONSchema_default_walker_draft3, type) { using namespace sourcemeta::core; - const auto result{default_schema_walker("type", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("type", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -121,7 +122,7 @@ TEST(JSONSchema_default_walker_draft3, type) { TEST(JSONSchema_default_walker_draft3, enum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enum", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("enum", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -132,7 +133,7 @@ TEST(JSONSchema_default_walker_draft3, enum) { TEST(JSONSchema_default_walker_draft3, maximum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximum", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("maximum", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -143,7 +144,7 @@ TEST(JSONSchema_default_walker_draft3, maximum) { TEST(JSONSchema_default_walker_draft3, minimum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimum", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("minimum", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -155,7 +156,7 @@ TEST(JSONSchema_default_walker_draft3, minimum) { TEST(JSONSchema_default_walker_draft3, exclusiveMaximum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMaximum", VOCABULARIES_DRAFT3)}; + schema_official_walker("exclusiveMaximum", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -167,7 +168,7 @@ TEST(JSONSchema_default_walker_draft3, exclusiveMaximum) { TEST(JSONSchema_default_walker_draft3, exclusiveMinimum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMinimum", VOCABULARIES_DRAFT3)}; + schema_official_walker("exclusiveMinimum", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -178,7 +179,7 @@ TEST(JSONSchema_default_walker_draft3, exclusiveMinimum) { TEST(JSONSchema_default_walker_draft3, maxLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxLength", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("maxLength", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -189,7 +190,7 @@ TEST(JSONSchema_default_walker_draft3, maxLength) { TEST(JSONSchema_default_walker_draft3, minLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minLength", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("minLength", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -200,7 +201,7 @@ TEST(JSONSchema_default_walker_draft3, minLength) { TEST(JSONSchema_default_walker_draft3, pattern) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pattern", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("pattern", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -211,7 +212,7 @@ TEST(JSONSchema_default_walker_draft3, pattern) { TEST(JSONSchema_default_walker_draft3, maxItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxItems", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("maxItems", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -222,7 +223,7 @@ TEST(JSONSchema_default_walker_draft3, maxItems) { TEST(JSONSchema_default_walker_draft3, minItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minItems", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("minItems", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -233,7 +234,7 @@ TEST(JSONSchema_default_walker_draft3, minItems) { TEST(JSONSchema_default_walker_draft3, uniqueItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("uniqueItems", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("uniqueItems", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -244,7 +245,7 @@ TEST(JSONSchema_default_walker_draft3, uniqueItems) { TEST(JSONSchema_default_walker_draft3, required) { using namespace sourcemeta::core; - const auto result{default_schema_walker("required", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("required", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -255,7 +256,7 @@ TEST(JSONSchema_default_walker_draft3, required) { TEST(JSONSchema_default_walker_draft3, format) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("format", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -266,7 +267,7 @@ TEST(JSONSchema_default_walker_draft3, format) { TEST(JSONSchema_default_walker_draft3, title) { using namespace sourcemeta::core; - const auto result{default_schema_walker("title", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("title", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -277,7 +278,7 @@ TEST(JSONSchema_default_walker_draft3, title) { TEST(JSONSchema_default_walker_draft3, description) { using namespace sourcemeta::core; - const auto result{default_schema_walker("description", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("description", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -288,7 +289,7 @@ TEST(JSONSchema_default_walker_draft3, description) { TEST(JSONSchema_default_walker_draft3, default) { using namespace sourcemeta::core; - const auto result{default_schema_walker("default", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("default", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -299,7 +300,7 @@ TEST(JSONSchema_default_walker_draft3, default) { TEST(JSONSchema_default_walker_draft3, divisibleBy) { using namespace sourcemeta::core; - const auto result{default_schema_walker("divisibleBy", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("divisibleBy", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -310,7 +311,7 @@ TEST(JSONSchema_default_walker_draft3, divisibleBy) { TEST(JSONSchema_default_walker_draft3, disallow) { using namespace sourcemeta::core; - const auto result{default_schema_walker("disallow", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("disallow", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -321,7 +322,7 @@ TEST(JSONSchema_default_walker_draft3, disallow) { TEST(JSONSchema_default_walker_draft3, extends) { using namespace sourcemeta::core; - const auto result{default_schema_walker("extends", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("extends", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -333,7 +334,7 @@ TEST(JSONSchema_default_walker_draft3, extends) { TEST(JSONSchema_default_walker_draft3, hyperschema_links) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("links", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("links", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -341,8 +342,8 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_links) { TEST(JSONSchema_default_walker_draft3, hyperschema_fragmentResolution) { using namespace sourcemeta::core; - const auto result{default_schema_walker("fragmentResolution", - VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + const auto result{schema_official_walker("fragmentResolution", + VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -351,7 +352,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_fragmentResolution) { TEST(JSONSchema_default_walker_draft3, hyperschema_root) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("root", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("root", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -360,7 +361,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_root) { TEST(JSONSchema_default_walker_draft3, hyperschema_readonly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readonly", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("readonly", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -368,8 +369,8 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_readonly) { TEST(JSONSchema_default_walker_draft3, hyperschema_contentEncoding) { using namespace sourcemeta::core; - const auto result{default_schema_walker("contentEncoding", - VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + const auto result{schema_official_walker("contentEncoding", + VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -378,7 +379,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_contentEncoding) { TEST(JSONSchema_default_walker_draft3, hyperschema_pathStart) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pathStart", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("pathStart", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -387,7 +388,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_pathStart) { TEST(JSONSchema_default_walker_draft3, hyperschema_mediaType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("mediaType", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("mediaType", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -396,7 +397,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_mediaType) { TEST(JSONSchema_default_walker_draft3, hyperschema_alternate) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("alternate", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("alternate", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -405,7 +406,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_alternate) { TEST(JSONSchema_default_walker_draft3, hyperschema_href) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("href", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("href", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -414,7 +415,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_href) { TEST(JSONSchema_default_walker_draft3, hyperschema_rel) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("rel", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("rel", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -423,7 +424,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_rel) { TEST(JSONSchema_default_walker_draft3, hyperschema_method) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("method", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("method", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -432,7 +433,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_method) { TEST(JSONSchema_default_walker_draft3, hyperschema_enctype) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("enctype", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("enctype", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); EXPECT_TRUE(result.dependencies.empty()); @@ -441,7 +442,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_enctype) { TEST(JSONSchema_default_walker_draft3, hyperschema_targetSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetSchema", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; + schema_official_walker("targetSchema", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -451,7 +452,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_targetSchema) { TEST(JSONSchema_default_walker_draft3, hyperschema_links_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("links", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("links", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -462,7 +463,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_fragmentResolution_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("fragmentResolution", VOCABULARIES_DRAFT3)}; + schema_official_walker("fragmentResolution", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -471,7 +472,7 @@ TEST(JSONSchema_default_walker_draft3, TEST(JSONSchema_default_walker_draft3, hyperschema_root_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("root", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("root", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -481,7 +482,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_root_without_hyperschema) { TEST(JSONSchema_default_walker_draft3, hyperschema_readonly_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("readonly", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("readonly", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -492,7 +493,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_contentEncoding_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentEncoding", VOCABULARIES_DRAFT3)}; + schema_official_walker("contentEncoding", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -502,7 +503,7 @@ TEST(JSONSchema_default_walker_draft3, TEST(JSONSchema_default_walker_draft3, hyperschema_pathStart_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pathStart", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("pathStart", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -512,7 +513,7 @@ TEST(JSONSchema_default_walker_draft3, TEST(JSONSchema_default_walker_draft3, hyperschema_mediaType_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("mediaType", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("mediaType", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -522,7 +523,7 @@ TEST(JSONSchema_default_walker_draft3, TEST(JSONSchema_default_walker_draft3, hyperschema_alternate_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("alternate", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("alternate", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -531,7 +532,7 @@ TEST(JSONSchema_default_walker_draft3, TEST(JSONSchema_default_walker_draft3, hyperschema_href_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("href", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("href", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -540,7 +541,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_href_without_hyperschema) { TEST(JSONSchema_default_walker_draft3, hyperschema_rel_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("rel", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("rel", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -549,7 +550,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_rel_without_hyperschema) { TEST(JSONSchema_default_walker_draft3, hyperschema_method_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("method", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("method", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -559,7 +560,7 @@ TEST(JSONSchema_default_walker_draft3, hyperschema_method_without_hyperschema) { TEST(JSONSchema_default_walker_draft3, hyperschema_enctype_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enctype", VOCABULARIES_DRAFT3)}; + const auto result{schema_official_walker("enctype", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -569,7 +570,8 @@ TEST(JSONSchema_default_walker_draft3, TEST(JSONSchema_default_walker_draft3, hyperschema_targetSchema_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("targetSchema", VOCABULARIES_DRAFT3)}; + const auto result{ + schema_official_walker("targetSchema", VOCABULARIES_DRAFT3)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -578,7 +580,7 @@ TEST(JSONSchema_default_walker_draft3, TEST(JSONSchema_default_walker_draft3, schema_keyword_priority_array) { const auto &vocabularies = VOCABULARIES_DRAFT3; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), @@ -587,7 +589,7 @@ TEST(JSONSchema_default_walker_draft3, schema_keyword_priority_array) { TEST(JSONSchema_default_walker_draft3, schema_keyword_priority_object) { const auto &vocabularies = VOCABULARIES_DRAFT3; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 1); EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), @@ -598,7 +600,7 @@ TEST(JSONSchema_default_walker_draft3, schema_keyword_priority_object) { TEST(JSONSchema_default_walker_draft3, schema_keyword_priority_unknown) { const auto &vocabularies = VOCABULARIES_DRAFT3; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 1); } diff --git a/test/jsonschema/jsonschema_default_walker_draft4_test.cc b/test/jsonschema/jsonschema_default_walker_draft4_test.cc index 67f9f5967..bad76f562 100644 --- a/test/jsonschema/jsonschema_default_walker_draft4_test.cc +++ b/test/jsonschema/jsonschema_default_walker_draft4_test.cc @@ -9,7 +9,7 @@ static const std::map VOCABULARIES_DRAFT4_HYPERSCHEMA{ TEST(JSONSchema_default_walker_draft4, schema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$schema", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("$schema", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -20,7 +20,7 @@ TEST(JSONSchema_default_walker_draft4, schema) { TEST(JSONSchema_default_walker_draft4, id) { using namespace sourcemeta::core; - const auto result{default_schema_walker("id", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("id", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -31,7 +31,7 @@ TEST(JSONSchema_default_walker_draft4, id) { TEST(JSONSchema_default_walker_draft4, ref) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$ref", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("$ref", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -41,7 +41,7 @@ TEST(JSONSchema_default_walker_draft4, ref) { TEST(JSONSchema_default_walker_draft4, definitions) { using namespace sourcemeta::core; - const auto result{default_schema_walker("definitions", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("definitions", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -52,7 +52,7 @@ TEST(JSONSchema_default_walker_draft4, definitions) { TEST(JSONSchema_default_walker_draft4, allOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("allOf", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("allOf", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInline); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -63,7 +63,7 @@ TEST(JSONSchema_default_walker_draft4, allOf) { TEST(JSONSchema_default_walker_draft4, anyOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("anyOf", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("anyOf", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -74,7 +74,7 @@ TEST(JSONSchema_default_walker_draft4, anyOf) { TEST(JSONSchema_default_walker_draft4, oneOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("oneOf", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("oneOf", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -85,7 +85,7 @@ TEST(JSONSchema_default_walker_draft4, oneOf) { TEST(JSONSchema_default_walker_draft4, not) { using namespace sourcemeta::core; - const auto result{default_schema_walker("not", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("not", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOther); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -96,7 +96,7 @@ TEST(JSONSchema_default_walker_draft4, not) { TEST(JSONSchema_default_walker_draft4, items) { using namespace sourcemeta::core; - const auto result{default_schema_walker("items", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("items", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -108,7 +108,7 @@ TEST(JSONSchema_default_walker_draft4, items) { TEST(JSONSchema_default_walker_draft4, additionalItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalItems", VOCABULARIES_DRAFT4)}; + schema_official_walker("additionalItems", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -119,7 +119,7 @@ TEST(JSONSchema_default_walker_draft4, additionalItems) { TEST(JSONSchema_default_walker_draft4, properties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("properties", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("properties", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -131,7 +131,7 @@ TEST(JSONSchema_default_walker_draft4, properties) { TEST(JSONSchema_default_walker_draft4, patternProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("patternProperties", VOCABULARIES_DRAFT4)}; + schema_official_walker("patternProperties", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -142,7 +142,8 @@ TEST(JSONSchema_default_walker_draft4, patternProperties) { TEST(JSONSchema_default_walker_draft4, dependencies) { using namespace sourcemeta::core; - const auto result{default_schema_walker("dependencies", VOCABULARIES_DRAFT4)}; + const auto result{ + schema_official_walker("dependencies", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -154,7 +155,7 @@ TEST(JSONSchema_default_walker_draft4, dependencies) { TEST(JSONSchema_default_walker_draft4, additionalProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalProperties", VOCABULARIES_DRAFT4)}; + schema_official_walker("additionalProperties", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -165,7 +166,7 @@ TEST(JSONSchema_default_walker_draft4, additionalProperties) { TEST(JSONSchema_default_walker_draft4, type) { using namespace sourcemeta::core; - const auto result{default_schema_walker("type", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("type", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -176,7 +177,7 @@ TEST(JSONSchema_default_walker_draft4, type) { TEST(JSONSchema_default_walker_draft4, enum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enum", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("enum", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -187,7 +188,7 @@ TEST(JSONSchema_default_walker_draft4, enum) { TEST(JSONSchema_default_walker_draft4, multipleOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("multipleOf", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("multipleOf", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -198,7 +199,7 @@ TEST(JSONSchema_default_walker_draft4, multipleOf) { TEST(JSONSchema_default_walker_draft4, maximum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximum", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("maximum", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -209,7 +210,7 @@ TEST(JSONSchema_default_walker_draft4, maximum) { TEST(JSONSchema_default_walker_draft4, minimum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimum", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("minimum", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -221,7 +222,7 @@ TEST(JSONSchema_default_walker_draft4, minimum) { TEST(JSONSchema_default_walker_draft4, exclusiveMaximum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMaximum", VOCABULARIES_DRAFT4)}; + schema_official_walker("exclusiveMaximum", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -233,7 +234,7 @@ TEST(JSONSchema_default_walker_draft4, exclusiveMaximum) { TEST(JSONSchema_default_walker_draft4, exclusiveMinimum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMinimum", VOCABULARIES_DRAFT4)}; + schema_official_walker("exclusiveMinimum", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -244,7 +245,7 @@ TEST(JSONSchema_default_walker_draft4, exclusiveMinimum) { TEST(JSONSchema_default_walker_draft4, maxLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxLength", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("maxLength", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -255,7 +256,7 @@ TEST(JSONSchema_default_walker_draft4, maxLength) { TEST(JSONSchema_default_walker_draft4, minLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minLength", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("minLength", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -266,7 +267,7 @@ TEST(JSONSchema_default_walker_draft4, minLength) { TEST(JSONSchema_default_walker_draft4, pattern) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pattern", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("pattern", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -277,7 +278,7 @@ TEST(JSONSchema_default_walker_draft4, pattern) { TEST(JSONSchema_default_walker_draft4, maxItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxItems", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("maxItems", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -288,7 +289,7 @@ TEST(JSONSchema_default_walker_draft4, maxItems) { TEST(JSONSchema_default_walker_draft4, minItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minItems", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("minItems", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -299,7 +300,7 @@ TEST(JSONSchema_default_walker_draft4, minItems) { TEST(JSONSchema_default_walker_draft4, uniqueItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("uniqueItems", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("uniqueItems", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -311,7 +312,7 @@ TEST(JSONSchema_default_walker_draft4, uniqueItems) { TEST(JSONSchema_default_walker_draft4, maxProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxProperties", VOCABULARIES_DRAFT4)}; + schema_official_walker("maxProperties", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -323,7 +324,7 @@ TEST(JSONSchema_default_walker_draft4, maxProperties) { TEST(JSONSchema_default_walker_draft4, minProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minProperties", VOCABULARIES_DRAFT4)}; + schema_official_walker("minProperties", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -334,7 +335,7 @@ TEST(JSONSchema_default_walker_draft4, minProperties) { TEST(JSONSchema_default_walker_draft4, required) { using namespace sourcemeta::core; - const auto result{default_schema_walker("required", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("required", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -345,7 +346,7 @@ TEST(JSONSchema_default_walker_draft4, required) { TEST(JSONSchema_default_walker_draft4, format) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("format", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -356,7 +357,7 @@ TEST(JSONSchema_default_walker_draft4, format) { TEST(JSONSchema_default_walker_draft4, title) { using namespace sourcemeta::core; - const auto result{default_schema_walker("title", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("title", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -367,7 +368,7 @@ TEST(JSONSchema_default_walker_draft4, title) { TEST(JSONSchema_default_walker_draft4, description) { using namespace sourcemeta::core; - const auto result{default_schema_walker("description", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("description", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -378,7 +379,7 @@ TEST(JSONSchema_default_walker_draft4, description) { TEST(JSONSchema_default_walker_draft4, default) { using namespace sourcemeta::core; - const auto result{default_schema_walker("default", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("default", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -390,7 +391,7 @@ TEST(JSONSchema_default_walker_draft4, default) { TEST(JSONSchema_default_walker_draft4, hyperschema_links) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("links", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("links", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -400,7 +401,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_links) { TEST(JSONSchema_default_walker_draft4, hyperschema_media) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("media", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("media", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -410,7 +411,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_media) { TEST(JSONSchema_default_walker_draft4, hyperschema_pathStart) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("pathStart", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("pathStart", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -420,7 +421,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_pathStart) { TEST(JSONSchema_default_walker_draft4, hyperschema_href) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("href", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("href", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -430,7 +431,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_href) { TEST(JSONSchema_default_walker_draft4, hyperschema_rel) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("rel", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("rel", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -440,7 +441,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_rel) { TEST(JSONSchema_default_walker_draft4, hyperschema_mediaType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("mediaType", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("mediaType", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -450,7 +451,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_mediaType) { TEST(JSONSchema_default_walker_draft4, hyperschema_method) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("method", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("method", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -460,7 +461,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_method) { TEST(JSONSchema_default_walker_draft4, hyperschema_encType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("encType", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("encType", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -470,7 +471,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_encType) { TEST(JSONSchema_default_walker_draft4, hyperschema_readOnly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readOnly", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("readOnly", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -480,7 +481,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_readOnly) { TEST(JSONSchema_default_walker_draft4, hyperschema_targetSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetSchema", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("targetSchema", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -491,7 +492,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_targetSchema) { TEST(JSONSchema_default_walker_draft4, hyperschema_schema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("schema", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; + schema_official_walker("schema", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -501,7 +502,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_schema) { TEST(JSONSchema_default_walker_draft4, hyperschema_links_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("links", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("links", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -510,7 +511,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_links_without_hyperschema) { TEST(JSONSchema_default_walker_draft4, hyperschema_media_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("media", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("media", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -520,7 +521,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_media_without_hyperschema) { TEST(JSONSchema_default_walker_draft4, hyperschema_pathStart_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pathStart", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("pathStart", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -529,7 +530,7 @@ TEST(JSONSchema_default_walker_draft4, TEST(JSONSchema_default_walker_draft4, hyperschema_href_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("href", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("href", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -538,7 +539,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_href_without_hyperschema) { TEST(JSONSchema_default_walker_draft4, hyperschema_rel_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("rel", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("rel", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -548,7 +549,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_rel_without_hyperschema) { TEST(JSONSchema_default_walker_draft4, hyperschema_mediaType_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("mediaType", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("mediaType", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -557,7 +558,7 @@ TEST(JSONSchema_default_walker_draft4, TEST(JSONSchema_default_walker_draft4, hyperschema_method_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("method", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("method", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -567,7 +568,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_method_without_hyperschema) { TEST(JSONSchema_default_walker_draft4, hyperschema_encType_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("encType", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("encType", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -577,7 +578,7 @@ TEST(JSONSchema_default_walker_draft4, TEST(JSONSchema_default_walker_draft4, hyperschema_readOnly_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("readOnly", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("readOnly", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -587,7 +588,8 @@ TEST(JSONSchema_default_walker_draft4, TEST(JSONSchema_default_walker_draft4, hyperschema_targetSchema_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("targetSchema", VOCABULARIES_DRAFT4)}; + const auto result{ + schema_official_walker("targetSchema", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -596,7 +598,7 @@ TEST(JSONSchema_default_walker_draft4, TEST(JSONSchema_default_walker_draft4, hyperschema_schema_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("schema", VOCABULARIES_DRAFT4)}; + const auto result{schema_official_walker("schema", VOCABULARIES_DRAFT4)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -605,7 +607,7 @@ TEST(JSONSchema_default_walker_draft4, hyperschema_schema_without_hyperschema) { TEST(JSONSchema_default_walker_draft4, schema_keyword_priority_array) { const auto &vocabularies = VOCABULARIES_DRAFT4; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), @@ -614,7 +616,7 @@ TEST(JSONSchema_default_walker_draft4, schema_keyword_priority_array) { TEST(JSONSchema_default_walker_draft4, schema_keyword_priority_object) { const auto &vocabularies = VOCABULARIES_DRAFT4; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 2); EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), @@ -625,7 +627,7 @@ TEST(JSONSchema_default_walker_draft4, schema_keyword_priority_object) { TEST(JSONSchema_default_walker_draft4, schema_keyword_priority_unknown) { const auto &vocabularies = VOCABULARIES_DRAFT4; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 1); } diff --git a/test/jsonschema/jsonschema_default_walker_draft6_test.cc b/test/jsonschema/jsonschema_default_walker_draft6_test.cc index 81bb84129..4068d139f 100644 --- a/test/jsonschema/jsonschema_default_walker_draft6_test.cc +++ b/test/jsonschema/jsonschema_default_walker_draft6_test.cc @@ -9,7 +9,7 @@ static const std::map VOCABULARIES_DRAFT6_HYPERSCHEMA{ TEST(JSONSchema_default_walker_draft6, schema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$schema", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("$schema", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -20,7 +20,7 @@ TEST(JSONSchema_default_walker_draft6, schema) { TEST(JSONSchema_default_walker_draft6, id) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$id", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("$id", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -31,7 +31,7 @@ TEST(JSONSchema_default_walker_draft6, id) { TEST(JSONSchema_default_walker_draft6, ref) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$ref", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("$ref", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -41,7 +41,7 @@ TEST(JSONSchema_default_walker_draft6, ref) { TEST(JSONSchema_default_walker_draft6, definitions) { using namespace sourcemeta::core; - const auto result{default_schema_walker("definitions", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("definitions", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -52,7 +52,7 @@ TEST(JSONSchema_default_walker_draft6, definitions) { TEST(JSONSchema_default_walker_draft6, allOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("allOf", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("allOf", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInline); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -63,7 +63,7 @@ TEST(JSONSchema_default_walker_draft6, allOf) { TEST(JSONSchema_default_walker_draft6, anyOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("anyOf", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("anyOf", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -74,7 +74,7 @@ TEST(JSONSchema_default_walker_draft6, anyOf) { TEST(JSONSchema_default_walker_draft6, oneOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("oneOf", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("oneOf", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -85,7 +85,7 @@ TEST(JSONSchema_default_walker_draft6, oneOf) { TEST(JSONSchema_default_walker_draft6, not) { using namespace sourcemeta::core; - const auto result{default_schema_walker("not", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("not", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOther); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -96,7 +96,7 @@ TEST(JSONSchema_default_walker_draft6, not) { TEST(JSONSchema_default_walker_draft6, items) { using namespace sourcemeta::core; - const auto result{default_schema_walker("items", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("items", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -108,7 +108,7 @@ TEST(JSONSchema_default_walker_draft6, items) { TEST(JSONSchema_default_walker_draft6, additionalItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalItems", VOCABULARIES_DRAFT6)}; + schema_official_walker("additionalItems", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -119,7 +119,7 @@ TEST(JSONSchema_default_walker_draft6, additionalItems) { TEST(JSONSchema_default_walker_draft6, contains) { using namespace sourcemeta::core; - const auto result{default_schema_walker("contains", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("contains", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -130,7 +130,7 @@ TEST(JSONSchema_default_walker_draft6, contains) { TEST(JSONSchema_default_walker_draft6, properties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("properties", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("properties", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -142,7 +142,7 @@ TEST(JSONSchema_default_walker_draft6, properties) { TEST(JSONSchema_default_walker_draft6, patternProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("patternProperties", VOCABULARIES_DRAFT6)}; + schema_official_walker("patternProperties", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -153,7 +153,8 @@ TEST(JSONSchema_default_walker_draft6, patternProperties) { TEST(JSONSchema_default_walker_draft6, dependencies) { using namespace sourcemeta::core; - const auto result{default_schema_walker("dependencies", VOCABULARIES_DRAFT6)}; + const auto result{ + schema_official_walker("dependencies", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -165,7 +166,7 @@ TEST(JSONSchema_default_walker_draft6, dependencies) { TEST(JSONSchema_default_walker_draft6, additionalProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalProperties", VOCABULARIES_DRAFT6)}; + schema_official_walker("additionalProperties", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -177,7 +178,7 @@ TEST(JSONSchema_default_walker_draft6, additionalProperties) { TEST(JSONSchema_default_walker_draft6, propertyNames) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("propertyNames", VOCABULARIES_DRAFT6)}; + schema_official_walker("propertyNames", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -188,7 +189,7 @@ TEST(JSONSchema_default_walker_draft6, propertyNames) { TEST(JSONSchema_default_walker_draft6, type) { using namespace sourcemeta::core; - const auto result{default_schema_walker("type", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("type", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -199,7 +200,7 @@ TEST(JSONSchema_default_walker_draft6, type) { TEST(JSONSchema_default_walker_draft6, enum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enum", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("enum", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -210,7 +211,7 @@ TEST(JSONSchema_default_walker_draft6, enum) { TEST(JSONSchema_default_walker_draft6, const) { using namespace sourcemeta::core; - const auto result{default_schema_walker("const", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("const", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -221,7 +222,7 @@ TEST(JSONSchema_default_walker_draft6, const) { TEST(JSONSchema_default_walker_draft6, multipleOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("multipleOf", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("multipleOf", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -232,7 +233,7 @@ TEST(JSONSchema_default_walker_draft6, multipleOf) { TEST(JSONSchema_default_walker_draft6, maximum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximum", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("maximum", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -243,7 +244,7 @@ TEST(JSONSchema_default_walker_draft6, maximum) { TEST(JSONSchema_default_walker_draft6, minimum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimum", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("minimum", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -255,7 +256,7 @@ TEST(JSONSchema_default_walker_draft6, minimum) { TEST(JSONSchema_default_walker_draft6, exclusiveMaximum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMaximum", VOCABULARIES_DRAFT6)}; + schema_official_walker("exclusiveMaximum", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -267,7 +268,7 @@ TEST(JSONSchema_default_walker_draft6, exclusiveMaximum) { TEST(JSONSchema_default_walker_draft6, exclusiveMinimum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMinimum", VOCABULARIES_DRAFT6)}; + schema_official_walker("exclusiveMinimum", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -278,7 +279,7 @@ TEST(JSONSchema_default_walker_draft6, exclusiveMinimum) { TEST(JSONSchema_default_walker_draft6, maxLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxLength", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("maxLength", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -289,7 +290,7 @@ TEST(JSONSchema_default_walker_draft6, maxLength) { TEST(JSONSchema_default_walker_draft6, minLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minLength", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("minLength", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -300,7 +301,7 @@ TEST(JSONSchema_default_walker_draft6, minLength) { TEST(JSONSchema_default_walker_draft6, pattern) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pattern", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("pattern", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -311,7 +312,7 @@ TEST(JSONSchema_default_walker_draft6, pattern) { TEST(JSONSchema_default_walker_draft6, maxItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxItems", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("maxItems", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -322,7 +323,7 @@ TEST(JSONSchema_default_walker_draft6, maxItems) { TEST(JSONSchema_default_walker_draft6, minItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minItems", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("minItems", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -333,7 +334,7 @@ TEST(JSONSchema_default_walker_draft6, minItems) { TEST(JSONSchema_default_walker_draft6, uniqueItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("uniqueItems", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("uniqueItems", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -345,7 +346,7 @@ TEST(JSONSchema_default_walker_draft6, uniqueItems) { TEST(JSONSchema_default_walker_draft6, maxProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxProperties", VOCABULARIES_DRAFT6)}; + schema_official_walker("maxProperties", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -357,7 +358,7 @@ TEST(JSONSchema_default_walker_draft6, maxProperties) { TEST(JSONSchema_default_walker_draft6, minProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minProperties", VOCABULARIES_DRAFT6)}; + schema_official_walker("minProperties", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -368,7 +369,7 @@ TEST(JSONSchema_default_walker_draft6, minProperties) { TEST(JSONSchema_default_walker_draft6, required) { using namespace sourcemeta::core; - const auto result{default_schema_walker("required", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("required", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -379,7 +380,7 @@ TEST(JSONSchema_default_walker_draft6, required) { TEST(JSONSchema_default_walker_draft6, format) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("format", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -390,7 +391,7 @@ TEST(JSONSchema_default_walker_draft6, format) { TEST(JSONSchema_default_walker_draft6, title) { using namespace sourcemeta::core; - const auto result{default_schema_walker("title", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("title", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -401,7 +402,7 @@ TEST(JSONSchema_default_walker_draft6, title) { TEST(JSONSchema_default_walker_draft6, description) { using namespace sourcemeta::core; - const auto result{default_schema_walker("description", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("description", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -412,7 +413,7 @@ TEST(JSONSchema_default_walker_draft6, description) { TEST(JSONSchema_default_walker_draft6, default) { using namespace sourcemeta::core; - const auto result{default_schema_walker("default", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("default", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -423,7 +424,7 @@ TEST(JSONSchema_default_walker_draft6, default) { TEST(JSONSchema_default_walker_draft6, examples) { using namespace sourcemeta::core; - const auto result{default_schema_walker("examples", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("examples", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -435,7 +436,7 @@ TEST(JSONSchema_default_walker_draft6, examples) { TEST(JSONSchema_default_walker_draft6, hyperschema_links) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("links", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + schema_official_walker("links", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -445,7 +446,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_links) { TEST(JSONSchema_default_walker_draft6, hyperschema_href) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("href", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + schema_official_walker("href", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -455,7 +456,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_href) { TEST(JSONSchema_default_walker_draft6, hyperschema_rel) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("rel", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + schema_official_walker("rel", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -465,7 +466,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_rel) { TEST(JSONSchema_default_walker_draft6, hyperschema_mediaType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("mediaType", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + schema_official_walker("mediaType", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -474,8 +475,8 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_mediaType) { TEST(JSONSchema_default_walker_draft6, hyperschema_submissionEncType) { using namespace sourcemeta::core; - const auto result{default_schema_walker("submissionEncType", - VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + const auto result{schema_official_walker("submissionEncType", + VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -485,7 +486,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_submissionEncType) { TEST(JSONSchema_default_walker_draft6, hyperschema_base) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("base", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + schema_official_walker("base", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -495,7 +496,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_base) { TEST(JSONSchema_default_walker_draft6, hyperschema_media) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("media", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + schema_official_walker("media", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -505,7 +506,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_media) { TEST(JSONSchema_default_walker_draft6, hyperschema_readOnly) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("readOnly", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + schema_official_walker("readOnly", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -517,7 +518,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_readOnly) { TEST(JSONSchema_default_walker_draft6, hyperschema_hrefSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("hrefSchema", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + schema_official_walker("hrefSchema", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -528,7 +529,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_hrefSchema) { TEST(JSONSchema_default_walker_draft6, hyperschema_targetSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetSchema", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + schema_official_walker("targetSchema", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -538,8 +539,8 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_targetSchema) { TEST(JSONSchema_default_walker_draft6, hyperschema_submissionSchema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("submissionSchema", - VOCABULARIES_DRAFT6_HYPERSCHEMA)}; + const auto result{schema_official_walker("submissionSchema", + VOCABULARIES_DRAFT6_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -549,7 +550,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_submissionSchema) { TEST(JSONSchema_default_walker_draft6, hyperschema_links_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("links", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("links", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -558,7 +559,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_links_without_hyperschema) { TEST(JSONSchema_default_walker_draft6, hyperschema_href_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("href", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("href", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -567,7 +568,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_href_without_hyperschema) { TEST(JSONSchema_default_walker_draft6, hyperschema_rel_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("rel", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("rel", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -577,7 +578,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_rel_without_hyperschema) { TEST(JSONSchema_default_walker_draft6, hyperschema_mediaType_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("mediaType", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("mediaType", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -588,7 +589,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_submissionEncType_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("submissionEncType", VOCABULARIES_DRAFT6)}; + schema_official_walker("submissionEncType", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -597,7 +598,7 @@ TEST(JSONSchema_default_walker_draft6, TEST(JSONSchema_default_walker_draft6, hyperschema_base_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("base", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("base", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -606,7 +607,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_base_without_hyperschema) { TEST(JSONSchema_default_walker_draft6, hyperschema_media_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("media", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("media", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -616,7 +617,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_media_without_hyperschema) { TEST(JSONSchema_default_walker_draft6, hyperschema_readOnly_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("readOnly", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("readOnly", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -628,7 +629,7 @@ TEST(JSONSchema_default_walker_draft6, TEST(JSONSchema_default_walker_draft6, hyperschema_hrefSchema_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("hrefSchema", VOCABULARIES_DRAFT6)}; + const auto result{schema_official_walker("hrefSchema", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -638,7 +639,8 @@ TEST(JSONSchema_default_walker_draft6, TEST(JSONSchema_default_walker_draft6, hyperschema_targetSchema_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("targetSchema", VOCABULARIES_DRAFT6)}; + const auto result{ + schema_official_walker("targetSchema", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -649,7 +651,7 @@ TEST(JSONSchema_default_walker_draft6, hyperschema_submissionSchema_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("submissionSchema", VOCABULARIES_DRAFT6)}; + schema_official_walker("submissionSchema", VOCABULARIES_DRAFT6)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -658,7 +660,7 @@ TEST(JSONSchema_default_walker_draft6, TEST(JSONSchema_default_walker_draft6, schema_keyword_priority_array) { const auto &vocabularies = VOCABULARIES_DRAFT6; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), @@ -667,7 +669,7 @@ TEST(JSONSchema_default_walker_draft6, schema_keyword_priority_array) { TEST(JSONSchema_default_walker_draft6, schema_keyword_priority_object) { const auto &vocabularies = VOCABULARIES_DRAFT6; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 2); EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), @@ -678,7 +680,7 @@ TEST(JSONSchema_default_walker_draft6, schema_keyword_priority_object) { TEST(JSONSchema_default_walker_draft6, schema_keyword_priority_unknown) { const auto &vocabularies = VOCABULARIES_DRAFT6; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 1); } diff --git a/test/jsonschema/jsonschema_default_walker_draft7_test.cc b/test/jsonschema/jsonschema_default_walker_draft7_test.cc index ab2c4ac35..d160efc7c 100644 --- a/test/jsonschema/jsonschema_default_walker_draft7_test.cc +++ b/test/jsonschema/jsonschema_default_walker_draft7_test.cc @@ -9,7 +9,7 @@ static const std::map VOCABULARIES_DRAFT7_HYPERSCHEMA{ TEST(JSONSchema_default_walker_draft7, schema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$schema", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("$schema", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -20,7 +20,7 @@ TEST(JSONSchema_default_walker_draft7, schema) { TEST(JSONSchema_default_walker_draft7, id) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$id", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("$id", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -31,7 +31,7 @@ TEST(JSONSchema_default_walker_draft7, id) { TEST(JSONSchema_default_walker_draft7, ref) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$ref", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("$ref", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Reference); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -41,7 +41,7 @@ TEST(JSONSchema_default_walker_draft7, ref) { TEST(JSONSchema_default_walker_draft7, definitions) { using namespace sourcemeta::core; - const auto result{default_schema_walker("definitions", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("definitions", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -52,7 +52,7 @@ TEST(JSONSchema_default_walker_draft7, definitions) { TEST(JSONSchema_default_walker_draft7, comment) { using namespace sourcemeta::core; - const auto result{default_schema_walker("$comment", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("$comment", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -63,7 +63,7 @@ TEST(JSONSchema_default_walker_draft7, comment) { TEST(JSONSchema_default_walker_draft7, allOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("allOf", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("allOf", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInline); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -74,7 +74,7 @@ TEST(JSONSchema_default_walker_draft7, allOf) { TEST(JSONSchema_default_walker_draft7, anyOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("anyOf", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("anyOf", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -85,7 +85,7 @@ TEST(JSONSchema_default_walker_draft7, anyOf) { TEST(JSONSchema_default_walker_draft7, oneOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("oneOf", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("oneOf", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -96,7 +96,7 @@ TEST(JSONSchema_default_walker_draft7, oneOf) { TEST(JSONSchema_default_walker_draft7, not) { using namespace sourcemeta::core; - const auto result{default_schema_walker("not", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("not", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOther); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -107,7 +107,7 @@ TEST(JSONSchema_default_walker_draft7, not) { TEST(JSONSchema_default_walker_draft7, if) { using namespace sourcemeta::core; - const auto result{default_schema_walker("if", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("if", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -118,7 +118,7 @@ TEST(JSONSchema_default_walker_draft7, if) { TEST(JSONSchema_default_walker_draft7, then) { using namespace sourcemeta::core; - const auto result{default_schema_walker("then", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("then", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -129,7 +129,7 @@ TEST(JSONSchema_default_walker_draft7, then) { TEST(JSONSchema_default_walker_draft7, else) { using namespace sourcemeta::core; - const auto result{default_schema_walker("else", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("else", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -140,7 +140,7 @@ TEST(JSONSchema_default_walker_draft7, else) { TEST(JSONSchema_default_walker_draft7, items) { using namespace sourcemeta::core; - const auto result{default_schema_walker("items", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("items", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElements); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -152,7 +152,7 @@ TEST(JSONSchema_default_walker_draft7, items) { TEST(JSONSchema_default_walker_draft7, additionalItems) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalItems", VOCABULARIES_DRAFT7)}; + schema_official_walker("additionalItems", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -163,7 +163,7 @@ TEST(JSONSchema_default_walker_draft7, additionalItems) { TEST(JSONSchema_default_walker_draft7, contains) { using namespace sourcemeta::core; - const auto result{default_schema_walker("contains", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("contains", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -174,7 +174,7 @@ TEST(JSONSchema_default_walker_draft7, contains) { TEST(JSONSchema_default_walker_draft7, properties) { using namespace sourcemeta::core; - const auto result{default_schema_walker("properties", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("properties", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -186,7 +186,7 @@ TEST(JSONSchema_default_walker_draft7, properties) { TEST(JSONSchema_default_walker_draft7, patternProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("patternProperties", VOCABULARIES_DRAFT7)}; + schema_official_walker("patternProperties", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -197,7 +197,8 @@ TEST(JSONSchema_default_walker_draft7, patternProperties) { TEST(JSONSchema_default_walker_draft7, dependencies) { using namespace sourcemeta::core; - const auto result{default_schema_walker("dependencies", VOCABULARIES_DRAFT7)}; + const auto result{ + schema_official_walker("dependencies", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembers); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -209,7 +210,7 @@ TEST(JSONSchema_default_walker_draft7, dependencies) { TEST(JSONSchema_default_walker_draft7, additionalProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("additionalProperties", VOCABULARIES_DRAFT7)}; + schema_official_walker("additionalProperties", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -221,7 +222,7 @@ TEST(JSONSchema_default_walker_draft7, additionalProperties) { TEST(JSONSchema_default_walker_draft7, propertyNames) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("propertyNames", VOCABULARIES_DRAFT7)}; + schema_official_walker("propertyNames", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlace); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -232,7 +233,7 @@ TEST(JSONSchema_default_walker_draft7, propertyNames) { TEST(JSONSchema_default_walker_draft7, type) { using namespace sourcemeta::core; - const auto result{default_schema_walker("type", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("type", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -243,7 +244,7 @@ TEST(JSONSchema_default_walker_draft7, type) { TEST(JSONSchema_default_walker_draft7, enum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("enum", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("enum", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -254,7 +255,7 @@ TEST(JSONSchema_default_walker_draft7, enum) { TEST(JSONSchema_default_walker_draft7, const) { using namespace sourcemeta::core; - const auto result{default_schema_walker("const", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("const", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -265,7 +266,7 @@ TEST(JSONSchema_default_walker_draft7, const) { TEST(JSONSchema_default_walker_draft7, multipleOf) { using namespace sourcemeta::core; - const auto result{default_schema_walker("multipleOf", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("multipleOf", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -276,7 +277,7 @@ TEST(JSONSchema_default_walker_draft7, multipleOf) { TEST(JSONSchema_default_walker_draft7, maximum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maximum", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("maximum", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -287,7 +288,7 @@ TEST(JSONSchema_default_walker_draft7, maximum) { TEST(JSONSchema_default_walker_draft7, minimum) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minimum", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("minimum", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -299,7 +300,7 @@ TEST(JSONSchema_default_walker_draft7, minimum) { TEST(JSONSchema_default_walker_draft7, exclusiveMaximum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMaximum", VOCABULARIES_DRAFT7)}; + schema_official_walker("exclusiveMaximum", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -311,7 +312,7 @@ TEST(JSONSchema_default_walker_draft7, exclusiveMaximum) { TEST(JSONSchema_default_walker_draft7, exclusiveMinimum) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("exclusiveMinimum", VOCABULARIES_DRAFT7)}; + schema_official_walker("exclusiveMinimum", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -322,7 +323,7 @@ TEST(JSONSchema_default_walker_draft7, exclusiveMinimum) { TEST(JSONSchema_default_walker_draft7, maxLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxLength", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("maxLength", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -333,7 +334,7 @@ TEST(JSONSchema_default_walker_draft7, maxLength) { TEST(JSONSchema_default_walker_draft7, minLength) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minLength", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("minLength", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -344,7 +345,7 @@ TEST(JSONSchema_default_walker_draft7, minLength) { TEST(JSONSchema_default_walker_draft7, pattern) { using namespace sourcemeta::core; - const auto result{default_schema_walker("pattern", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("pattern", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -355,7 +356,7 @@ TEST(JSONSchema_default_walker_draft7, pattern) { TEST(JSONSchema_default_walker_draft7, maxItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("maxItems", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("maxItems", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -366,7 +367,7 @@ TEST(JSONSchema_default_walker_draft7, maxItems) { TEST(JSONSchema_default_walker_draft7, minItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("minItems", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("minItems", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -377,7 +378,7 @@ TEST(JSONSchema_default_walker_draft7, minItems) { TEST(JSONSchema_default_walker_draft7, uniqueItems) { using namespace sourcemeta::core; - const auto result{default_schema_walker("uniqueItems", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("uniqueItems", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -389,7 +390,7 @@ TEST(JSONSchema_default_walker_draft7, uniqueItems) { TEST(JSONSchema_default_walker_draft7, maxProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("maxProperties", VOCABULARIES_DRAFT7)}; + schema_official_walker("maxProperties", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -401,7 +402,7 @@ TEST(JSONSchema_default_walker_draft7, maxProperties) { TEST(JSONSchema_default_walker_draft7, minProperties) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("minProperties", VOCABULARIES_DRAFT7)}; + schema_official_walker("minProperties", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -412,7 +413,7 @@ TEST(JSONSchema_default_walker_draft7, minProperties) { TEST(JSONSchema_default_walker_draft7, required) { using namespace sourcemeta::core; - const auto result{default_schema_walker("required", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("required", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Assertion); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -423,7 +424,7 @@ TEST(JSONSchema_default_walker_draft7, required) { TEST(JSONSchema_default_walker_draft7, format) { using namespace sourcemeta::core; - const auto result{default_schema_walker("format", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("format", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Other); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -435,7 +436,7 @@ TEST(JSONSchema_default_walker_draft7, format) { TEST(JSONSchema_default_walker_draft7, contentEncoding) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentEncoding", VOCABULARIES_DRAFT7)}; + schema_official_walker("contentEncoding", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -447,7 +448,7 @@ TEST(JSONSchema_default_walker_draft7, contentEncoding) { TEST(JSONSchema_default_walker_draft7, contentMediaType) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("contentMediaType", VOCABULARIES_DRAFT7)}; + schema_official_walker("contentMediaType", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -458,7 +459,7 @@ TEST(JSONSchema_default_walker_draft7, contentMediaType) { TEST(JSONSchema_default_walker_draft7, title) { using namespace sourcemeta::core; - const auto result{default_schema_walker("title", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("title", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -469,7 +470,7 @@ TEST(JSONSchema_default_walker_draft7, title) { TEST(JSONSchema_default_walker_draft7, description) { using namespace sourcemeta::core; - const auto result{default_schema_walker("description", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("description", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -480,7 +481,7 @@ TEST(JSONSchema_default_walker_draft7, description) { TEST(JSONSchema_default_walker_draft7, default) { using namespace sourcemeta::core; - const auto result{default_schema_walker("default", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("default", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -491,7 +492,7 @@ TEST(JSONSchema_default_walker_draft7, default) { TEST(JSONSchema_default_walker_draft7, readOnly) { using namespace sourcemeta::core; - const auto result{default_schema_walker("readOnly", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("readOnly", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -502,7 +503,7 @@ TEST(JSONSchema_default_walker_draft7, readOnly) { TEST(JSONSchema_default_walker_draft7, writeOnly) { using namespace sourcemeta::core; - const auto result{default_schema_walker("writeOnly", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("writeOnly", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -513,7 +514,7 @@ TEST(JSONSchema_default_walker_draft7, writeOnly) { TEST(JSONSchema_default_walker_draft7, examples) { using namespace sourcemeta::core; - const auto result{default_schema_walker("examples", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("examples", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Comment); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -525,7 +526,7 @@ TEST(JSONSchema_default_walker_draft7, examples) { TEST(JSONSchema_default_walker_draft7, hyperschema_links) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("links", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("links", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -535,7 +536,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_links) { TEST(JSONSchema_default_walker_draft7, hyperschema_base) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("base", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("base", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -545,7 +546,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_base) { TEST(JSONSchema_default_walker_draft7, hyperschema_anchor) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("anchor", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("anchor", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -555,7 +556,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_anchor) { TEST(JSONSchema_default_walker_draft7, hyperschema_anchorPointer) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("anchorPointer", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("anchorPointer", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -565,7 +566,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_anchorPointer) { TEST(JSONSchema_default_walker_draft7, hyperschema_rel) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("rel", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("rel", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -575,7 +576,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_rel) { TEST(JSONSchema_default_walker_draft7, hyperschema_href) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("href", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("href", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -584,8 +585,8 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_href) { TEST(JSONSchema_default_walker_draft7, hyperschema_templatePointers) { using namespace sourcemeta::core; - const auto result{default_schema_walker("templatePointers", - VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + const auto result{schema_official_walker("templatePointers", + VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -594,8 +595,8 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_templatePointers) { TEST(JSONSchema_default_walker_draft7, hyperschema_templateRequired) { using namespace sourcemeta::core; - const auto result{default_schema_walker("templateRequired", - VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + const auto result{schema_official_walker("templateRequired", + VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -604,8 +605,8 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_templateRequired) { TEST(JSONSchema_default_walker_draft7, hyperschema_targetMediaType) { using namespace sourcemeta::core; - const auto result{default_schema_walker("targetMediaType", - VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + const auto result{schema_official_walker("targetMediaType", + VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -615,7 +616,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_targetMediaType) { TEST(JSONSchema_default_walker_draft7, hyperschema_targetHints) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetHints", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("targetHints", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -624,8 +625,8 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_targetHints) { TEST(JSONSchema_default_walker_draft7, hyperschema_submissionMediaType) { using namespace sourcemeta::core; - const auto result{default_schema_walker("submissionMediaType", - VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + const auto result{schema_official_walker("submissionMediaType", + VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -635,7 +636,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_submissionMediaType) { TEST(JSONSchema_default_walker_draft7, hyperschema_hrefSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("hrefSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("hrefSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -646,7 +647,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_hrefSchema) { TEST(JSONSchema_default_walker_draft7, hyperschema_targetSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("targetSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -657,7 +658,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_targetSchema) { TEST(JSONSchema_default_walker_draft7, hyperschema_headerSchema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("headerSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + schema_official_walker("headerSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -667,8 +668,8 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_headerSchema) { TEST(JSONSchema_default_walker_draft7, hyperschema_submissionSchema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("submissionSchema", - VOCABULARIES_DRAFT7_HYPERSCHEMA)}; + const auto result{schema_official_walker("submissionSchema", + VOCABULARIES_DRAFT7_HYPERSCHEMA)}; EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValue); EXPECT_TRUE(result.vocabulary.has_value()); EXPECT_EQ(result.vocabulary.value(), @@ -678,7 +679,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_submissionSchema) { TEST(JSONSchema_default_walker_draft7, hyperschema_links_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("links", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("links", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -687,7 +688,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_links_without_hyperschema) { TEST(JSONSchema_default_walker_draft7, hyperschema_base_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("base", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("base", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -696,7 +697,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_base_without_hyperschema) { TEST(JSONSchema_default_walker_draft7, hyperschema_anchor_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("anchor", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("anchor", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -707,7 +708,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_anchorPointer_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("anchorPointer", VOCABULARIES_DRAFT7)}; + schema_official_walker("anchorPointer", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -716,7 +717,7 @@ TEST(JSONSchema_default_walker_draft7, TEST(JSONSchema_default_walker_draft7, hyperschema_rel_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("rel", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("rel", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -725,7 +726,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_rel_without_hyperschema) { TEST(JSONSchema_default_walker_draft7, hyperschema_href_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("href", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("href", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -736,7 +737,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_templatePointers_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("templatePointers", VOCABULARIES_DRAFT7)}; + schema_official_walker("templatePointers", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -747,7 +748,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_templateRequired_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("templateRequired", VOCABULARIES_DRAFT7)}; + schema_official_walker("templateRequired", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -758,7 +759,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_targetMediaType_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("targetMediaType", VOCABULARIES_DRAFT7)}; + schema_official_walker("targetMediaType", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -768,7 +769,7 @@ TEST(JSONSchema_default_walker_draft7, TEST(JSONSchema_default_walker_draft7, hyperschema_targetHints_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("targetHints", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("targetHints", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -779,7 +780,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_submissionMediaType_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("submissionMediaType", VOCABULARIES_DRAFT7)}; + schema_official_walker("submissionMediaType", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -789,7 +790,7 @@ TEST(JSONSchema_default_walker_draft7, TEST(JSONSchema_default_walker_draft7, hyperschema_hrefSchema_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("hrefSchema", VOCABULARIES_DRAFT7)}; + const auto result{schema_official_walker("hrefSchema", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -799,7 +800,8 @@ TEST(JSONSchema_default_walker_draft7, TEST(JSONSchema_default_walker_draft7, hyperschema_targetSchema_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("targetSchema", VOCABULARIES_DRAFT7)}; + const auto result{ + schema_official_walker("targetSchema", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -809,7 +811,8 @@ TEST(JSONSchema_default_walker_draft7, TEST(JSONSchema_default_walker_draft7, hyperschema_headerSchema_without_hyperschema) { using namespace sourcemeta::core; - const auto result{default_schema_walker("headerSchema", VOCABULARIES_DRAFT7)}; + const auto result{ + schema_official_walker("headerSchema", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -820,7 +823,7 @@ TEST(JSONSchema_default_walker_draft7, hyperschema_submissionSchema_without_hyperschema) { using namespace sourcemeta::core; const auto result{ - default_schema_walker("submissionSchema", VOCABULARIES_DRAFT7)}; + schema_official_walker("submissionSchema", VOCABULARIES_DRAFT7)}; EXPECT_EQ(result.type, SchemaKeywordType::Unknown); EXPECT_FALSE(result.vocabulary.has_value()); const std::set expected{"$ref"}; @@ -829,7 +832,7 @@ TEST(JSONSchema_default_walker_draft7, TEST(JSONSchema_default_walker_draft7, schema_keyword_priority_array) { const auto &vocabularies = VOCABULARIES_DRAFT7; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), @@ -838,7 +841,7 @@ TEST(JSONSchema_default_walker_draft7, schema_keyword_priority_array) { TEST(JSONSchema_default_walker_draft7, schema_keyword_priority_object) { const auto &vocabularies = VOCABULARIES_DRAFT7; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 2); EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), @@ -849,7 +852,7 @@ TEST(JSONSchema_default_walker_draft7, schema_keyword_priority_object) { TEST(JSONSchema_default_walker_draft7, schema_keyword_priority_other) { const auto &vocabularies = VOCABULARIES_DRAFT7; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("if", vocabularies, walker), 1); EXPECT_EQ(schema_keyword_priority("then", vocabularies, walker), 2); @@ -858,7 +861,7 @@ TEST(JSONSchema_default_walker_draft7, schema_keyword_priority_other) { TEST(JSONSchema_default_walker_draft7, schema_keyword_priority_unknown) { const auto &vocabularies = VOCABULARIES_DRAFT7; - const auto &walker = sourcemeta::core::default_schema_walker; + const auto &walker = sourcemeta::core::schema_official_walker; using namespace sourcemeta::core; EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 1); } diff --git a/test/jsonschema/jsonschema_frame_2019_09_test.cc b/test/jsonschema/jsonschema_frame_2019_09_test.cc index ca66ad119..40c638c8e 100644 --- a/test/jsonschema/jsonschema_frame_2019_09_test.cc +++ b/test/jsonschema/jsonschema_frame_2019_09_test.cc @@ -58,7 +58,7 @@ TEST(JSONSchema_frame_2019_09, anonymous_with_nested_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -106,7 +106,7 @@ TEST(JSONSchema_frame_2019_09, empty_schema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -146,7 +146,7 @@ TEST(JSONSchema_frame_2019_09, one_level_applicators_without_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -206,7 +206,7 @@ TEST(JSONSchema_frame_2019_09, one_level_applicators_with_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 14); @@ -295,7 +295,7 @@ TEST(JSONSchema_frame_2019_09, subschema_absolute_identifier) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -373,7 +373,7 @@ TEST(JSONSchema_frame_2019_09, nested_schemas) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 30); @@ -527,7 +527,7 @@ TEST(JSONSchema_frame_2019_09, id_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -541,7 +541,7 @@ TEST(JSONSchema_frame_2019_09, static_anchor_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -553,7 +553,7 @@ TEST(JSONSchema_frame_2019_09, explicit_argument_id_same) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "https://json-schema.org/draft/2019-09/schema", "https://www.sourcemeta.com/schema"); @@ -592,7 +592,7 @@ TEST(JSONSchema_frame_2019_09, anchor_top_level) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 5); @@ -650,7 +650,7 @@ TEST(JSONSchema_frame_2019_09, explicit_argument_id_different) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "https://json-schema.org/draft/2019-09/schema", "https://www.example.com"); @@ -775,7 +775,7 @@ TEST(JSONSchema_frame_2019_09, ref_metaschema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -818,7 +818,7 @@ TEST(JSONSchema_frame_2019_09, location_independent_identifier_anonymous) { sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -831,7 +831,7 @@ TEST(JSONSchema_frame_2019_09, recursive_anchor_true_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 5); @@ -882,7 +882,7 @@ TEST(JSONSchema_frame_2019_09, recursive_anchor_false_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 4); @@ -929,7 +929,7 @@ TEST(JSONSchema_frame_2019_09, recursive_anchor_true_without_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -984,7 +984,7 @@ TEST(JSONSchema_frame_2019_09, recursive_anchor_false_without_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 5); @@ -1030,7 +1030,7 @@ TEST(JSONSchema_frame_2019_09, recursive_ref_no_recursive_anchor_anonymous) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 4); @@ -1073,7 +1073,7 @@ TEST(JSONSchema_frame_2019_09, recursive_ref_no_recursive_anchor) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 5); @@ -1122,7 +1122,7 @@ TEST(JSONSchema_frame_2019_09, recursive_ref_recursive_anchor_false_anonymous) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 5); @@ -1170,7 +1170,7 @@ TEST(JSONSchema_frame_2019_09, recursive_ref_recursive_anchor_false) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -1223,7 +1223,7 @@ TEST(JSONSchema_frame_2019_09, recursive_ref_recursive_anchor_true_anonymous) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -1277,7 +1277,7 @@ TEST(JSONSchema_frame_2019_09, recursive_ref_recursive_anchor_true) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 7); @@ -1339,7 +1339,7 @@ TEST(JSONSchema_frame_2019_09, })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 10); @@ -1414,7 +1414,7 @@ TEST(JSONSchema_frame_2019_09, })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 11); @@ -1495,7 +1495,7 @@ TEST(JSONSchema_frame_2019_09, recursive_ref_nested_recursive_anchor_true) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 7); @@ -1560,7 +1560,7 @@ TEST(JSONSchema_frame_2019_09, recursive_ref_multiple_recursive_anchor_true) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 14); @@ -1651,7 +1651,7 @@ TEST(JSONSchema_frame_2019_09, recursive_anchor_conflict) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -1664,7 +1664,7 @@ TEST(JSONSchema_frame_2019_09, invalid_recursive_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -1680,7 +1680,7 @@ TEST(JSONSchema_frame_2019_09, recursive_anchor_on_relative_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 11); @@ -1755,7 +1755,7 @@ TEST(JSONSchema_frame_2019_09, ref_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 7); @@ -1816,7 +1816,7 @@ TEST(JSONSchema_frame_2019_09, ref_from_definitions) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -1884,7 +1884,7 @@ TEST(JSONSchema_frame_2019_09, relative_base_uri_without_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -1921,7 +1921,7 @@ TEST(JSONSchema_frame_2019_09, relative_base_uri_with_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 10); @@ -1973,7 +1973,7 @@ TEST(JSONSchema_frame_2019_09, relative_id_leading_slash) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); diff --git a/test/jsonschema/jsonschema_frame_2020_12_test.cc b/test/jsonschema/jsonschema_frame_2020_12_test.cc index 652c50063..5b7648d48 100644 --- a/test/jsonschema/jsonschema_frame_2020_12_test.cc +++ b/test/jsonschema/jsonschema_frame_2020_12_test.cc @@ -58,7 +58,7 @@ TEST(JSONSchema_frame_2020_12, anonymous_with_nested_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -106,7 +106,7 @@ TEST(JSONSchema_frame_2020_12, empty_schema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -146,7 +146,7 @@ TEST(JSONSchema_frame_2020_12, one_level_applicators_without_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -206,7 +206,7 @@ TEST(JSONSchema_frame_2020_12, one_level_applicators_with_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 14); @@ -294,7 +294,7 @@ TEST(JSONSchema_frame_2020_12, subschema_absolute_identifier) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -364,7 +364,7 @@ TEST(JSONSchema_frame_2020_12, nested_schemas) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 30); @@ -518,7 +518,7 @@ TEST(JSONSchema_frame_2020_12, id_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -532,7 +532,7 @@ TEST(JSONSchema_frame_2020_12, static_anchor_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -544,7 +544,7 @@ TEST(JSONSchema_frame_2020_12, explicit_argument_id_same) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "https://json-schema.org/draft/2020-12/schema", "https://www.sourcemeta.com/schema"); @@ -583,7 +583,7 @@ TEST(JSONSchema_frame_2020_12, anchor_top_level) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 5); @@ -641,7 +641,7 @@ TEST(JSONSchema_frame_2020_12, explicit_argument_id_different) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "https://json-schema.org/draft/2020-12/schema", "https://www.example.com"); @@ -790,7 +790,7 @@ TEST(JSONSchema_frame_2020_12, dynamic_refs_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.references().size(), 7); @@ -850,7 +850,7 @@ TEST(JSONSchema_frame_2020_12, dynamic_refs_with_no_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.references().size(), 7); @@ -890,7 +890,7 @@ TEST(JSONSchema_frame_2020_12, ref_to_dynamic_anchor) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.references().size(), 2); @@ -916,7 +916,7 @@ TEST(JSONSchema_frame_2020_12, different_dynamic_and_refs_in_same_object) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.references().size(), 3); @@ -950,7 +950,7 @@ TEST(JSONSchema_frame_2020_12, same_dynamic_and_refs_in_same_object) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.references().size(), 3); @@ -987,7 +987,7 @@ TEST(JSONSchema_frame_2020_12, dynamic_anchor_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 21); @@ -1108,7 +1108,7 @@ TEST(JSONSchema_frame_2020_12, dynamic_anchor_without_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 7); @@ -1169,7 +1169,7 @@ TEST(JSONSchema_frame_2020_12, })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -1236,7 +1236,7 @@ TEST(JSONSchema_frame_2020_12, dynamic_ref_to_single_dynamic_anchor_external) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 10); @@ -1310,7 +1310,7 @@ TEST(JSONSchema_frame_2020_12, dynamic_anchor_same_on_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -1326,7 +1326,7 @@ TEST(JSONSchema_frame_2020_12, no_id_recursive_empty_pointer) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 5); @@ -1369,7 +1369,7 @@ TEST(JSONSchema_frame_2020_12, ref_metaschema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -1412,7 +1412,7 @@ TEST(JSONSchema_frame_2020_12, location_independent_identifier_anonymous) { sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -1428,7 +1428,7 @@ TEST(JSONSchema_frame_2020_12, ref_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 7); @@ -1489,7 +1489,7 @@ TEST(JSONSchema_frame_2020_12, ref_from_definitions) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -1557,7 +1557,7 @@ TEST(JSONSchema_frame_2020_12, relative_base_uri_without_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -1594,7 +1594,7 @@ TEST(JSONSchema_frame_2020_12, relative_base_uri_with_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 10); @@ -1651,11 +1651,11 @@ TEST(JSONSchema_frame_2020_12, idempotent_with_refs) { sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -1710,7 +1710,7 @@ TEST(JSONSchema_frame_2020_12, allof_refs) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.references().size(), 3); diff --git a/test/jsonschema/jsonschema_frame_draft0_test.cc b/test/jsonschema/jsonschema_frame_draft0_test.cc index 6c682602d..ca9ce9e3f 100644 --- a/test/jsonschema/jsonschema_frame_draft0_test.cc +++ b/test/jsonschema/jsonschema_frame_draft0_test.cc @@ -40,7 +40,7 @@ TEST(JSONSchema_frame_draft0, anonymous_with_nested_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -87,7 +87,7 @@ TEST(JSONSchema_frame_draft0, empty_schema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -127,7 +127,7 @@ TEST(JSONSchema_frame_draft0, one_level_applicators_without_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -184,7 +184,7 @@ TEST(JSONSchema_frame_draft0, one_level_applicators_with_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -248,7 +248,7 @@ TEST(JSONSchema_frame_draft0, subschema_absolute_identifier) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -309,7 +309,7 @@ TEST(JSONSchema_frame_draft0, id_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -321,7 +321,7 @@ TEST(JSONSchema_frame_draft0, explicit_argument_id_same) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-00/schema#", "https://www.sourcemeta.com/schema"); @@ -367,7 +367,7 @@ TEST(JSONSchema_frame_draft0, explicit_argument_id_different) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-00/schema#", "https://www.example.com"); @@ -447,7 +447,7 @@ TEST(JSONSchema_frame_draft0, ref_metaschema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); diff --git a/test/jsonschema/jsonschema_frame_draft1_test.cc b/test/jsonschema/jsonschema_frame_draft1_test.cc index 6140abefb..f530d38b5 100644 --- a/test/jsonschema/jsonschema_frame_draft1_test.cc +++ b/test/jsonschema/jsonschema_frame_draft1_test.cc @@ -40,7 +40,7 @@ TEST(JSONSchema_frame_draft1, anonymous_with_nested_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -87,7 +87,7 @@ TEST(JSONSchema_frame_draft1, empty_schema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -127,7 +127,7 @@ TEST(JSONSchema_frame_draft1, one_level_applicators_without_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -184,7 +184,7 @@ TEST(JSONSchema_frame_draft1, one_level_applicators_with_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -248,7 +248,7 @@ TEST(JSONSchema_frame_draft1, subschema_absolute_identifier) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -309,7 +309,7 @@ TEST(JSONSchema_frame_draft1, id_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -321,7 +321,7 @@ TEST(JSONSchema_frame_draft1, explicit_argument_id_same) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-01/schema#", "https://www.sourcemeta.com/schema"); @@ -367,7 +367,7 @@ TEST(JSONSchema_frame_draft1, explicit_argument_id_different) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-01/schema#", "https://www.example.com"); @@ -447,7 +447,7 @@ TEST(JSONSchema_frame_draft1, ref_metaschema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); diff --git a/test/jsonschema/jsonschema_frame_draft2_test.cc b/test/jsonschema/jsonschema_frame_draft2_test.cc index 3781f46da..192dbe6d7 100644 --- a/test/jsonschema/jsonschema_frame_draft2_test.cc +++ b/test/jsonschema/jsonschema_frame_draft2_test.cc @@ -40,7 +40,7 @@ TEST(JSONSchema_frame_draft2, anonymous_with_nested_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -87,7 +87,7 @@ TEST(JSONSchema_frame_draft2, empty_schema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -127,7 +127,7 @@ TEST(JSONSchema_frame_draft2, one_level_applicators_without_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -184,7 +184,7 @@ TEST(JSONSchema_frame_draft2, one_level_applicators_with_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -248,7 +248,7 @@ TEST(JSONSchema_frame_draft2, subschema_absolute_identifier) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -309,7 +309,7 @@ TEST(JSONSchema_frame_draft2, id_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -321,7 +321,7 @@ TEST(JSONSchema_frame_draft2, explicit_argument_id_same) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-02/schema#", "https://www.sourcemeta.com/schema"); @@ -367,7 +367,7 @@ TEST(JSONSchema_frame_draft2, explicit_argument_id_different) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-02/schema#", "https://www.example.com"); @@ -447,7 +447,7 @@ TEST(JSONSchema_frame_draft2, ref_metaschema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); diff --git a/test/jsonschema/jsonschema_frame_draft3_test.cc b/test/jsonschema/jsonschema_frame_draft3_test.cc index 43403cde5..5e424b870 100644 --- a/test/jsonschema/jsonschema_frame_draft3_test.cc +++ b/test/jsonschema/jsonschema_frame_draft3_test.cc @@ -40,7 +40,7 @@ TEST(JSONSchema_frame_draft3, anonymous_with_nested_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -87,7 +87,7 @@ TEST(JSONSchema_frame_draft3, empty_schema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -127,7 +127,7 @@ TEST(JSONSchema_frame_draft3, one_level_applicators_without_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -184,7 +184,7 @@ TEST(JSONSchema_frame_draft3, one_level_applicators_with_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -248,7 +248,7 @@ TEST(JSONSchema_frame_draft3, subschema_absolute_identifier) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -309,7 +309,7 @@ TEST(JSONSchema_frame_draft3, id_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -321,7 +321,7 @@ TEST(JSONSchema_frame_draft3, explicit_argument_id_same) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-03/schema#", "https://www.sourcemeta.com/schema"); @@ -367,7 +367,7 @@ TEST(JSONSchema_frame_draft3, explicit_argument_id_different) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-03/schema#", "https://www.example.com"); @@ -447,7 +447,7 @@ TEST(JSONSchema_frame_draft3, ref_metaschema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -482,7 +482,7 @@ TEST(JSONSchema_frame_draft3, ref_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 4); diff --git a/test/jsonschema/jsonschema_frame_draft4_test.cc b/test/jsonschema/jsonschema_frame_draft4_test.cc index 02f953d40..3bfc4160a 100644 --- a/test/jsonschema/jsonschema_frame_draft4_test.cc +++ b/test/jsonschema/jsonschema_frame_draft4_test.cc @@ -49,7 +49,7 @@ TEST(JSONSchema_frame_draft4, anonymous_with_nested_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -96,7 +96,7 @@ TEST(JSONSchema_frame_draft4, empty_schema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -136,7 +136,7 @@ TEST(JSONSchema_frame_draft4, one_level_applicators_without_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -193,7 +193,7 @@ TEST(JSONSchema_frame_draft4, one_level_applicators_with_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -257,7 +257,7 @@ TEST(JSONSchema_frame_draft4, subschema_absolute_identifier) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -318,7 +318,7 @@ TEST(JSONSchema_frame_draft4, id_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -330,7 +330,7 @@ TEST(JSONSchema_frame_draft4, explicit_argument_id_same) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-04/schema#", "https://www.sourcemeta.com/schema"); @@ -376,7 +376,7 @@ TEST(JSONSchema_frame_draft4, explicit_argument_id_different) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-04/schema#", "https://www.example.com"); @@ -456,7 +456,7 @@ TEST(JSONSchema_frame_draft4, ref_metaschema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -497,7 +497,7 @@ TEST(JSONSchema_frame_draft4, location_independent_identifier_anonymous) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -562,7 +562,7 @@ TEST(JSONSchema_frame_draft4, ref_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 7); @@ -612,7 +612,7 @@ TEST(JSONSchema_frame_draft4, relative_base_uri_without_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -649,7 +649,7 @@ TEST(JSONSchema_frame_draft4, relative_base_uri_with_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 10); diff --git a/test/jsonschema/jsonschema_frame_draft6_test.cc b/test/jsonschema/jsonschema_frame_draft6_test.cc index a102c7c4f..65ae4856e 100644 --- a/test/jsonschema/jsonschema_frame_draft6_test.cc +++ b/test/jsonschema/jsonschema_frame_draft6_test.cc @@ -49,7 +49,7 @@ TEST(JSONSchema_frame_draft6, anonymous_with_nested_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -96,7 +96,7 @@ TEST(JSONSchema_frame_draft6, empty_schema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -136,7 +136,7 @@ TEST(JSONSchema_frame_draft6, one_level_applicators_without_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -193,7 +193,7 @@ TEST(JSONSchema_frame_draft6, one_level_applicators_with_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -257,7 +257,7 @@ TEST(JSONSchema_frame_draft6, subschema_absolute_identifier) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -318,7 +318,7 @@ TEST(JSONSchema_frame_draft6, id_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -330,7 +330,7 @@ TEST(JSONSchema_frame_draft6, explicit_argument_id_same) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-06/schema#", "https://www.sourcemeta.com/schema"); @@ -376,7 +376,7 @@ TEST(JSONSchema_frame_draft6, explicit_argument_id_different) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-06/schema#", "https://www.example.com"); @@ -456,7 +456,7 @@ TEST(JSONSchema_frame_draft6, ref_metaschema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -497,7 +497,7 @@ TEST(JSONSchema_frame_draft6, location_independent_identifier_anonymous) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -562,7 +562,7 @@ TEST(JSONSchema_frame_draft6, ref_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 7); @@ -612,7 +612,7 @@ TEST(JSONSchema_frame_draft6, relative_base_uri_without_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -649,7 +649,7 @@ TEST(JSONSchema_frame_draft6, relative_base_uri_with_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 10); diff --git a/test/jsonschema/jsonschema_frame_draft7_test.cc b/test/jsonschema/jsonschema_frame_draft7_test.cc index 0ef347ea2..be99da862 100644 --- a/test/jsonschema/jsonschema_frame_draft7_test.cc +++ b/test/jsonschema/jsonschema_frame_draft7_test.cc @@ -49,7 +49,7 @@ TEST(JSONSchema_frame_draft7, anonymous_with_nested_schema_resource) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 6); @@ -96,7 +96,7 @@ TEST(JSONSchema_frame_draft7, empty_schema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -136,7 +136,7 @@ TEST(JSONSchema_frame_draft7, one_level_applicators_without_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -193,7 +193,7 @@ TEST(JSONSchema_frame_draft7, one_level_applicators_with_identifiers) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -257,7 +257,7 @@ TEST(JSONSchema_frame_draft7, subschema_absolute_identifier) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 9); @@ -318,7 +318,7 @@ TEST(JSONSchema_frame_draft7, id_override) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -330,7 +330,7 @@ TEST(JSONSchema_frame_draft7, explicit_argument_id_same) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-07/schema#", "https://www.sourcemeta.com/schema"); @@ -376,7 +376,7 @@ TEST(JSONSchema_frame_draft7, explicit_argument_id_different) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-07/schema#", "https://www.example.com"); @@ -456,7 +456,7 @@ TEST(JSONSchema_frame_draft7, ref_metaschema) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -497,7 +497,7 @@ TEST(JSONSchema_frame_draft7, location_independent_identifier_anonymous) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 8); @@ -562,7 +562,7 @@ TEST(JSONSchema_frame_draft7, ref_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 7); @@ -612,7 +612,7 @@ TEST(JSONSchema_frame_draft7, relative_base_uri_without_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 3); @@ -649,7 +649,7 @@ TEST(JSONSchema_frame_draft7, relative_base_uri_with_ref) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 10); diff --git a/test/jsonschema/jsonschema_frame_test.cc b/test/jsonschema/jsonschema_frame_test.cc index f0288bed1..053e84946 100644 --- a/test/jsonschema/jsonschema_frame_test.cc +++ b/test/jsonschema/jsonschema_frame_test.cc @@ -27,7 +27,7 @@ TEST(JSONSchema_frame, nested_schemas_mixing_dialects) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 21); @@ -185,7 +185,7 @@ TEST(JSONSchema_frame, no_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 14); @@ -271,7 +271,7 @@ TEST(JSONSchema_frame, no_id_with_default) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "https://json-schema.org/draft/2020-12/schema", "https://www.sourcemeta.com/schema"); @@ -323,7 +323,7 @@ TEST(JSONSchema_frame, anchor_on_absolute_subid) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.locations().size(), 12); @@ -413,7 +413,7 @@ TEST(JSONSchema_frame, uri_iterators) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); std::set uris; @@ -459,7 +459,7 @@ TEST(JSONSchema_frame, no_refs) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.references().size(), 1); @@ -491,7 +491,7 @@ TEST(JSONSchema_frame, refs_with_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_FRAME_DESTINATION_OF(frame, Static, @@ -555,7 +555,7 @@ TEST(JSONSchema_frame, refs_with_no_id) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_FRAME_DESTINATION_OF(frame, Static, "", 0, "/properties/foo/$ref") @@ -596,7 +596,7 @@ TEST(JSONSchema_frame, no_dynamic_ref_on_old_drafts) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.references().size(), 1); @@ -617,7 +617,7 @@ TEST(JSONSchema_frame, remote_refs) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(document, sourcemeta::core::default_schema_walker, + frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); EXPECT_EQ(frame.references().size(), 4); @@ -641,7 +641,7 @@ TEST(JSONSchema_frame, no_dialect) { })JSON"); sourcemeta::core::SchemaFrame frame; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } diff --git a/test/jsonschema/jsonschema_keyword_iterator_test.cc b/test/jsonschema/jsonschema_keyword_iterator_test.cc index f29784c78..3f26e5a58 100644 --- a/test/jsonschema/jsonschema_keyword_iterator_test.cc +++ b/test/jsonschema/jsonschema_keyword_iterator_test.cc @@ -28,7 +28,7 @@ TEST(JSONSchema_keyword_iterator, draft_2020_12) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -118,7 +118,7 @@ TEST(JSONSchema_keyword_iterator, draft_2019_09) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -204,7 +204,7 @@ TEST(JSONSchema_keyword_iterator, draft7) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -268,7 +268,7 @@ TEST(JSONSchema_keyword_iterator, draft6) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -323,7 +323,7 @@ TEST(JSONSchema_keyword_iterator, draft4) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -377,7 +377,7 @@ TEST(JSONSchema_keyword_iterator, draft3) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -425,7 +425,7 @@ TEST(JSONSchema_keyword_iterator, draft2) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -463,7 +463,7 @@ TEST(JSONSchema_keyword_iterator, draft1) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -501,7 +501,7 @@ TEST(JSONSchema_keyword_iterator, draft0) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -537,7 +537,7 @@ TEST(JSONSchema_keyword_iterator, unknown_keyword) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); } @@ -572,7 +572,7 @@ TEST(JSONSchema_keyword_iterator, with_default_dialect) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "https://json-schema.org/draft/2020-12/schema")) { entries.push_back(entry); @@ -607,7 +607,7 @@ TEST(JSONSchema_keyword_iterator, no_default_dialect) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); @@ -636,7 +636,7 @@ TEST(JSONSchema_keyword_iterator, boolean_true) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); } @@ -649,7 +649,7 @@ TEST(JSONSchema_keyword_iterator, boolean_false) { std::vector entries; for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)) { entries.push_back(entry); } diff --git a/test/jsonschema/jsonschema_relativize_test.cc b/test/jsonschema/jsonschema_relativize_test.cc index 75495d312..6c4620201 100644 --- a/test/jsonschema/jsonschema_relativize_test.cc +++ b/test/jsonschema/jsonschema_relativize_test.cc @@ -22,7 +22,7 @@ TEST(JSONSchema_relativize, draft4_1) { } })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto expected = sourcemeta::core::parse_json(R"JSON({ @@ -57,7 +57,7 @@ TEST(JSONSchema_relativize, draft4_2) { } })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto expected = sourcemeta::core::parse_json(R"JSON({ @@ -95,7 +95,7 @@ TEST(JSONSchema_relativize, draft4_3) { } })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto expected = sourcemeta::core::parse_json(R"JSON({ @@ -132,7 +132,7 @@ TEST(JSONSchema_relativize, draft4_4) { } })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto expected = sourcemeta::core::parse_json(R"JSON({ @@ -168,7 +168,7 @@ TEST(JSONSchema_relativize, draft4_5) { } })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto expected = sourcemeta::core::parse_json(R"JSON({ @@ -204,7 +204,7 @@ TEST(JSONSchema_relativize, draft4_6) { } })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, std::nullopt, "http://asyncapi.com/definitions"); @@ -230,7 +230,7 @@ TEST(JSONSchema_relativize, draft4_7) { } })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, "http://json-schema.org/draft-04/schema"); @@ -257,7 +257,7 @@ TEST(JSONSchema_relativize, draft4_8) { })JSON"); EXPECT_THROW(sourcemeta::core::relativize( - schema, sourcemeta::core::default_schema_walker, + schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), sourcemeta::core::SchemaError); } @@ -273,7 +273,7 @@ TEST(JSONSchema_relativize, 2020_12_1) { } })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto expected = sourcemeta::core::parse_json(R"JSON({ @@ -296,7 +296,7 @@ TEST(JSONSchema_relativize, 2020_12_2) { "$ref": "../../schema.json" })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto expected = sourcemeta::core::parse_json(R"JSON({ @@ -318,7 +318,7 @@ TEST(JSONSchema_relativize, recursive_ref) { } })JSON"); - sourcemeta::core::relativize(schema, sourcemeta::core::default_schema_walker, + sourcemeta::core::relativize(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto expected = sourcemeta::core::parse_json(R"JSON({ diff --git a/test/jsonschema/jsonschema_transformer_test.cc b/test/jsonschema/jsonschema_transformer_test.cc index 7fd7a4a8b..f448a2617 100644 --- a/test/jsonschema/jsonschema_transformer_test.cc +++ b/test/jsonschema/jsonschema_transformer_test.cc @@ -21,30 +21,7 @@ TEST(JSONSchema_transformer, flat_document_no_applicators) { "qux": "xxx" })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, - sourcemeta::core::official_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "qux": "xxx" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_transformer, flat_document_no_applicators_no_walker) { - sourcemeta::core::SchemaTransformer bundle; - bundle.add(); - bundle.add(); - - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "foo": "bar", - "bar": "baz", - "qux": "xxx" - })JSON"); - - bundle.apply(document, sourcemeta::core::schema_walker_none, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -66,7 +43,7 @@ TEST(JSONSchema_transformer, throw_if_no_dialect_invalid_default) { "qux": "xxx" })JSON"); - EXPECT_THROW(bundle.apply(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, sourcemeta::core::empty_pointer, "https://example.com/invalid"), @@ -93,7 +70,7 @@ TEST(JSONSchema_transformer, with_default_dialect) { "qux": "xxx" })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, sourcemeta::core::empty_pointer, "https://json-schema.org/draft/2020-12/schema"); @@ -117,7 +94,7 @@ TEST(JSONSchema_transformer, with_explicit_default_dialect_same) { "qux": "xxx" })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, sourcemeta::core::empty_pointer, "https://json-schema.org/draft/2020-12/schema"); @@ -140,7 +117,7 @@ TEST(JSONSchema_transformer, throw_on_rules_called_twice) { "foo": "bar" })JSON"); - EXPECT_THROW(bundle.apply(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver), std::runtime_error); } @@ -156,7 +133,7 @@ TEST(JSONSchema_transformer, top_level_rule) { } })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -186,7 +163,7 @@ TEST(JSONSchema_transformer, walker_2020_12) { } })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -210,39 +187,6 @@ TEST(JSONSchema_transformer, walker_2020_12) { EXPECT_EQ(document, expected); } -TEST(JSONSchema_transformer, none_walker) { - sourcemeta::core::SchemaTransformer bundle; - bundle.add(); - - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "type": "string" }, - "bar": { - "items": { - "type": "number" - } - } - } - })JSON"); - - bundle.apply(document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "here": true, - "properties": { - "foo": { "type": "string" }, - "bar": { - "items": { "type": "number" } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - TEST(JSONSchema_transformer, mismatch_default_dialect) { sourcemeta::core::SchemaTransformer bundle; bundle.add(); @@ -259,7 +203,7 @@ TEST(JSONSchema_transformer, mismatch_default_dialect) { } })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, sourcemeta::core::empty_pointer, "http://json-schema.org/draft-04/schema#"); @@ -301,7 +245,7 @@ TEST(JSONSchema_transformer, specific_subschema) { } })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, {"properties", "bar"}); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -336,7 +280,7 @@ TEST(JSONSchema_transformer, rule_pointers) { } })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -368,7 +312,7 @@ TEST(JSONSchema_transformer, multi_dialect_rules) { } })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -406,7 +350,7 @@ TEST(JSONSchema_transformer, dialect_specific_rules) { } })JSON"); - bundle.apply(document, sourcemeta::core::default_schema_walker, + bundle.apply(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ @@ -439,7 +383,7 @@ TEST(JSONSchema_transformer, check_top_level) { std::vector> entries; const bool result = bundle.check( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, [&entries](const auto &pointer, const auto &name, const auto &message) { entries.emplace_back(pointer, name, message); @@ -476,7 +420,7 @@ TEST(JSONSchema_transformer, check_subschema) { std::vector> entries; const bool result = bundle.check( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, [&entries](const auto &pointer, const auto &name, const auto &message) { entries.emplace_back(pointer, name, message); @@ -509,7 +453,7 @@ TEST(JSONSchema_transformer, check_no_match) { std::vector> entries; const bool result = bundle.check( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, [&entries](const auto &pointer, const auto &name, const auto &message) { entries.emplace_back(pointer, name, message); @@ -529,7 +473,7 @@ TEST(JSONSchema_transformer, check_empty) { std::vector> entries; const bool result = bundle.check( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, [&entries](const auto &pointer, const auto &name, const auto &message) { entries.emplace_back(pointer, name, message); @@ -550,7 +494,7 @@ TEST(JSONSchema_transformer, check_throw_if_no_dialect_invalid_default) { "qux": "xxx" })JSON"); - EXPECT_THROW(bundle.check(document, sourcemeta::core::default_schema_walker, + EXPECT_THROW(bundle.check(document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, nullptr, sourcemeta::core::empty_pointer, "https://example.com/invalid"), @@ -574,7 +518,7 @@ TEST(JSONSchema_transformer, check_with_default_dialect) { std::vector> entries; const bool result = bundle.check( - document, sourcemeta::core::default_schema_walker, + document, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, [&entries](const auto &pointer, const auto &name, const auto &message) { entries.emplace_back(pointer, name, message); diff --git a/test/jsonschema/jsonschema_unevaluated_2019_09_test.cc b/test/jsonschema/jsonschema_unevaluated_2019_09_test.cc index 20026c240..a95158e0f 100644 --- a/test/jsonschema/jsonschema_unevaluated_2019_09_test.cc +++ b/test/jsonschema/jsonschema_unevaluated_2019_09_test.cc @@ -16,10 +16,10 @@ TEST(JSONSchema_unevaluated_2019_09, unevaluatedProperties_1) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -48,10 +48,10 @@ TEST(JSONSchema_unevaluated_2019_09, unevaluatedProperties_2) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -96,10 +96,10 @@ TEST(JSONSchema_unevaluated_2019_09, unevaluatedProperties_3) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -135,10 +135,10 @@ TEST(JSONSchema_unevaluated_2019_09, unevaluatedProperties_4) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -166,10 +166,10 @@ TEST(JSONSchema_unevaluated_2019_09, unevaluatedItems_1) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -201,10 +201,10 @@ TEST(JSONSchema_unevaluated_2019_09, unevaluatedItems_2) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -226,10 +226,10 @@ TEST(JSONSchema_unevaluated_2019_09, unevaluatedItems_3) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); diff --git a/test/jsonschema/jsonschema_unevaluated_2020_12_test.cc b/test/jsonschema/jsonschema_unevaluated_2020_12_test.cc index e8978395f..8baeaba11 100644 --- a/test/jsonschema/jsonschema_unevaluated_2020_12_test.cc +++ b/test/jsonschema/jsonschema_unevaluated_2020_12_test.cc @@ -16,10 +16,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedProperties_1) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -48,10 +48,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedProperties_2) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -83,10 +83,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedProperties_3) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -121,10 +121,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedProperties_4) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -153,10 +153,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedProperties_5) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 2); @@ -181,10 +181,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedProperties_6) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 2); @@ -220,10 +220,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedProperties_7) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -261,10 +261,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedProperties_8) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -287,10 +287,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedItems_1) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 1); @@ -315,10 +315,10 @@ TEST(JSONSchema_unevaluated_2020_12, unevaluatedItems_2) { })JSON"); sourcemeta::core::SchemaFrame frame; - frame.analyse(schema, sourcemeta::core::default_schema_walker, + frame.analyse(schema, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver); const auto result{sourcemeta::core::unevaluated( - schema, frame, sourcemeta::core::default_schema_walker, + schema, frame, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver)}; EXPECT_EQ(result.size(), 2); diff --git a/test/jsonschema/jsonschema_unidentify_test.cc b/test/jsonschema/jsonschema_unidentify_test.cc index 4c3d0040e..c2452528e 100644 --- a/test/jsonschema/jsonschema_unidentify_test.cc +++ b/test/jsonschema/jsonschema_unidentify_test.cc @@ -180,8 +180,9 @@ TEST(JSONSchema_unidentify, 2020_12) { } })JSON"); - sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_2020_12); + sourcemeta::core::unidentify(document, + sourcemeta::core::schema_official_walker, + test_resolver_2020_12); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -212,10 +213,11 @@ TEST(JSONSchema_unidentify, 2020_12_bundle) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_2020_12); - sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_2020_12); + sourcemeta::core::unidentify(document, + sourcemeta::core::schema_official_walker, + test_resolver_2020_12); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -259,10 +261,11 @@ TEST(JSONSchema_unidentify, 2020_12_bundle_boolean_subschema) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_2020_12); - sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_2020_12); + sourcemeta::core::unidentify(document, + sourcemeta::core::schema_official_walker, + test_resolver_2020_12); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -280,10 +283,11 @@ TEST(JSONSchema_unidentify, 2020_12_bundle_metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_2020_12); - sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_2020_12); + sourcemeta::core::unidentify(document, + sourcemeta::core::schema_official_walker, + test_resolver_2020_12); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "#/$defs/https%3A~1~1example.com~1meta~11.json", @@ -317,8 +321,9 @@ TEST(JSONSchema_unidentify, 2019_09) { } })JSON"); - sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_2019_09); + sourcemeta::core::unidentify(document, + sourcemeta::core::schema_official_walker, + test_resolver_2019_09); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "https://json-schema.org/draft/2019-09/schema", @@ -349,10 +354,11 @@ TEST(JSONSchema_unidentify, 2019_09_bundle) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_2019_09); - sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_2019_09); + sourcemeta::core::unidentify(document, + sourcemeta::core::schema_official_walker, + test_resolver_2019_09); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "https://json-schema.org/draft/2019-09/schema", @@ -393,10 +399,11 @@ TEST(JSONSchema_unidentify, 2019_09_bundle_metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_2019_09); - sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_2019_09); + sourcemeta::core::unidentify(document, + sourcemeta::core::schema_official_walker, + test_resolver_2019_09); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "#/$defs/https%3A~1~1example.com~1meta~11.json", @@ -428,7 +435,7 @@ TEST(JSONSchema_unidentify, draft7) { })JSON"); sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_draft7); + document, sourcemeta::core::schema_official_walker, test_resolver_draft7); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "http://json-schema.org/draft-07/schema#", @@ -453,10 +460,10 @@ TEST(JSONSchema_unidentify, draft7_bundle) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_draft7); sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_draft7); + document, sourcemeta::core::schema_official_walker, test_resolver_draft7); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "http://json-schema.org/draft-07/schema#", @@ -486,10 +493,10 @@ TEST(JSONSchema_unidentify, draft7_bundle_metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_draft7); sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_draft7); + document, sourcemeta::core::schema_official_walker, test_resolver_draft7); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "#/definitions/https%3A~1~1example.com~1meta~11.json", @@ -519,7 +526,7 @@ TEST(JSONSchema_unidentify, draft6) { })JSON"); sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_draft6); + document, sourcemeta::core::schema_official_walker, test_resolver_draft6); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "http://json-schema.org/draft-06/schema#", @@ -544,10 +551,10 @@ TEST(JSONSchema_unidentify, draft6_bundle) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_draft6); sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_draft6); + document, sourcemeta::core::schema_official_walker, test_resolver_draft6); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "http://json-schema.org/draft-06/schema#", @@ -577,10 +584,10 @@ TEST(JSONSchema_unidentify, draft6_bundle_metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_draft6); sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_draft6); + document, sourcemeta::core::schema_official_walker, test_resolver_draft6); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "#/definitions/https%3A~1~1example.com~1meta~11.json", @@ -610,7 +617,7 @@ TEST(JSONSchema_unidentify, draft4) { })JSON"); sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_draft4); + document, sourcemeta::core::schema_official_walker, test_resolver_draft4); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "http://json-schema.org/draft-04/schema#", @@ -635,10 +642,10 @@ TEST(JSONSchema_unidentify, draft4_bundle) { } })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_draft4); sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_draft4); + document, sourcemeta::core::schema_official_walker, test_resolver_draft4); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "http://json-schema.org/draft-04/schema#", @@ -668,10 +675,10 @@ TEST(JSONSchema_unidentify, draft4_bundle_metaschema) { "type": "string" })JSON"); - sourcemeta::core::bundle(document, sourcemeta::core::default_schema_walker, + sourcemeta::core::bundle(document, sourcemeta::core::schema_official_walker, test_resolver_draft4); sourcemeta::core::unidentify( - document, sourcemeta::core::default_schema_walker, test_resolver_draft4); + document, sourcemeta::core::schema_official_walker, test_resolver_draft4); const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ "$schema": "#/definitions/https%3A~1~1example.com~1meta~11.json", diff --git a/test/jsonschema/jsonschema_walker_none_test.cc b/test/jsonschema/jsonschema_walker_none_test.cc deleted file mode 100644 index 98cc5a7df..000000000 --- a/test/jsonschema/jsonschema_walker_none_test.cc +++ /dev/null @@ -1,460 +0,0 @@ -#include -#include - -#include -#include -#include - -TEST(JSONSchema_walker_none, flat_2020_12) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "contentSchema": { "type": "array" }, - "unevaluatedItems": { "type": "integer" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_TRUE(subschemas.empty()); - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_walker_none, deep_2020_12) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "contentSchema": { "type": "array" }, - "unevaluatedItems": { "type": "integer" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.front(), document); - EXPECT_EQ(entries.size(), 1); - EXPECT_EQ(entries.front().pointer, sourcemeta::core::Pointer{}); - EXPECT_EQ(entries.front().dialect, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_EQ(entries.front().vocabularies.size(), 7); - EXPECT_EQ(entries.front().base_dialect, - "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_walker_none, flat_2019_09) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "contentSchema": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_TRUE(subschemas.empty()); - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_walker_none, deep_2019_09) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "contentSchema": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.front(), document); - EXPECT_EQ(entries.size(), 1); - EXPECT_EQ(entries.front().pointer, sourcemeta::core::Pointer{}); - EXPECT_EQ(entries.front().dialect, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_EQ(entries.front().vocabularies.size(), 6); - EXPECT_EQ(entries.front().base_dialect, - "https://json-schema.org/draft/2019-09/schema"); -} - -TEST(JSONSchema_walker_none, flat_draft7) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "anyOf": [ { "type": "array" } ], - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_TRUE(subschemas.empty()); - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_walker_none, deep_draft7) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "anyOf": [ { "type": "array" } ], - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.front(), document); - EXPECT_EQ(entries.size(), 1); - EXPECT_EQ(entries.front().pointer, sourcemeta::core::Pointer{}); - EXPECT_EQ(entries.front().dialect, "http://json-schema.org/draft-07/schema#"); - EXPECT_EQ(entries.front().vocabularies.size(), 1); - EXPECT_EQ(entries.front().base_dialect, - "http://json-schema.org/draft-07/schema#"); -} - -TEST(JSONSchema_walker_none, flat_draft6) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "anyOf": [ { "type": "array" } ], - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_TRUE(subschemas.empty()); - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_walker_none, deep_draft6) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "anyOf": [ { "type": "array" } ], - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.front(), document); - EXPECT_EQ(entries.size(), 1); - EXPECT_EQ(entries.front().pointer, sourcemeta::core::Pointer{}); - EXPECT_EQ(entries.front().dialect, "http://json-schema.org/draft-06/schema#"); - EXPECT_EQ(entries.front().vocabularies.size(), 1); - EXPECT_EQ(entries.front().base_dialect, - "http://json-schema.org/draft-06/schema#"); -} - -TEST(JSONSchema_walker_none, flat_draft4) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "anyOf": [ { "type": "array" } ], - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_TRUE(subschemas.empty()); - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_walker_none, deep_draft4) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "anyOf": [ { "type": "array" } ], - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.front(), document); - EXPECT_EQ(entries.size(), 1); - EXPECT_EQ(entries.front().pointer, sourcemeta::core::Pointer{}); - EXPECT_EQ(entries.front().dialect, "http://json-schema.org/draft-04/schema#"); - EXPECT_EQ(entries.front().vocabularies.size(), 1); - EXPECT_EQ(entries.front().base_dialect, - "http://json-schema.org/draft-04/schema#"); -} - -TEST(JSONSchema_walker_none, flat_draft3) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "additionalProperties": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_TRUE(subschemas.empty()); - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_walker_none, deep_draft3) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "additionalProperties": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.front(), document); - EXPECT_EQ(entries.size(), 1); - EXPECT_EQ(entries.front().pointer, sourcemeta::core::Pointer{}); - EXPECT_EQ(entries.front().dialect, "http://json-schema.org/draft-03/schema#"); - EXPECT_EQ(entries.front().vocabularies.size(), 1); - EXPECT_EQ(entries.front().base_dialect, - "http://json-schema.org/draft-03/schema#"); -} - -TEST(JSONSchema_walker_none, flat_draft2) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "additionalProperties": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_TRUE(subschemas.empty()); - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_walker_none, deep_draft2) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "additionalProperties": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.front(), document); - EXPECT_EQ(entries.size(), 1); - EXPECT_EQ(entries.front().pointer, sourcemeta::core::Pointer{}); - EXPECT_EQ(entries.front().dialect, "http://json-schema.org/draft-02/schema#"); - EXPECT_EQ(entries.front().vocabularies.size(), 1); - EXPECT_EQ(entries.front().base_dialect, - "http://json-schema.org/draft-02/hyper-schema#"); -} - -TEST(JSONSchema_walker_none, flat_draft1) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "additionalProperties": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_TRUE(subschemas.empty()); - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_walker_none, deep_draft1) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "additionalProperties": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.front(), document); - EXPECT_EQ(entries.size(), 1); - EXPECT_EQ(entries.front().pointer, sourcemeta::core::Pointer{}); - EXPECT_EQ(entries.front().dialect, "http://json-schema.org/draft-01/schema#"); - EXPECT_EQ(entries.front().vocabularies.size(), 1); - EXPECT_EQ(entries.front().base_dialect, - "http://json-schema.org/draft-01/hyper-schema#"); -} - -TEST(JSONSchema_walker_none, flat_draft0) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "additionalProperties": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_TRUE(subschemas.empty()); - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_walker_none, deep_draft0) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "additionalProperties": { "type": "array" }, - "properties": { - "foo": { "type": "object" } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker_none, - sourcemeta::core::official_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.front(), document); - EXPECT_EQ(entries.size(), 1); - EXPECT_EQ(entries.front().pointer, sourcemeta::core::Pointer{}); - EXPECT_EQ(entries.front().dialect, "http://json-schema.org/draft-00/schema#"); - EXPECT_EQ(entries.front().vocabularies.size(), 1); - EXPECT_EQ(entries.front().base_dialect, - "http://json-schema.org/draft-00/hyper-schema#"); -} diff --git a/test/jsonschema/referencingsuite.cc b/test/jsonschema/referencingsuite.cc index 493b57faa..427bb4466 100644 --- a/test/jsonschema/referencingsuite.cc +++ b/test/jsonschema/referencingsuite.cc @@ -50,7 +50,7 @@ class ReferencingTest : public testing::Test { new_entries; for (const auto &[uri, schema] : this->registry) { sourcemeta::core::SchemaFrame frame; - frame.analyse(schema.first, sourcemeta::core::default_schema_walker, + frame.analyse(schema.first, sourcemeta::core::schema_official_walker, sourcemeta::core::official_resolver, this->dialect, uri); for (const auto &[key, entry] : frame.locations()) { new_entries.insert(