Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vendorpull https://github.com/sourcemeta/vendorpull 1dcbac42809cf87cb5b045106b863e17ad84ba02
core https://github.com/sourcemeta/core 38d686c3e828da4748d4b58bb522bf91e5a0e8b5
core https://github.com/sourcemeta/core 0836d83873a0328b5a1a25848f29bdb8253734c0
bootstrap https://github.com/twbs/bootstrap 1a6fdfae6be09b09eaced8f0e442ca6f7680a61e
4 changes: 2 additions & 2 deletions src/compiler/mapper/enum_8_bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Enum8Bit final : public sourcemeta::core::SchemaTransformRule {
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("enum") && schema.at("enum").is_array() &&
!location.pointer.empty() && schema.at("enum").size() > 1 &&
is_byte(schema.at("enum").size() - 1);
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/enum_8_bit_top_level.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Enum8BitTopLevel final : public sourcemeta::core::SchemaTransformRule {
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("enum") && schema.at("enum").is_array() &&
location.pointer.empty() && schema.at("enum").size() > 1 &&
is_byte(schema.at("enum").size() - 1);
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/enum_arbitrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class EnumArbitrary final : public sourcemeta::core::SchemaTransformRule {
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("enum") && schema.at("enum").is_array() &&
!location.pointer.empty() && schema.at("enum").size() > 1 &&
!is_byte(schema.at("enum").size() - 1);
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/enum_singleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class EnumSingleton final : public sourcemeta::core::SchemaTransformRule {
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("enum") && schema.at("enum").is_array() &&
schema.at("enum").size() == 1;
}
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_bounded_8_bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class IntegerBounded8Bit final : public sourcemeta::core::SchemaTransformRule {
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
schema.defines("minimum") && schema.defines("maximum") &&
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_bounded_greater_than_8_bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class IntegerBoundedGreaterThan8Bit final
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
schema.defines("minimum") && schema.defines("maximum") &&
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_bounded_multiplier_8_bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class IntegerBoundedMultiplier8Bit final
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
if (location.dialect != "https://json-schema.org/draft/2020-12/schema" ||
!vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") ||
!vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) ||
!schema.defines("type") || schema.at("type").to_string() != "integer" ||
!schema.defines("minimum") || !schema.at("minimum").is_integer() ||
!schema.defines("maximum") || !schema.at("maximum").is_integer() ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class IntegerBoundedMultiplierGreaterThan8Bit final
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
if (location.dialect != "https://json-schema.org/draft/2020-12/schema" ||
!vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") ||
!vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) ||
!schema.defines("type") || schema.at("type").to_string() != "integer" ||
!schema.defines("minimum") || !schema.at("minimum").is_integer() ||
!schema.defines("maximum") || !schema.at("maximum").is_integer() ||
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_lower_bound.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class IntegerLowerBound final : public sourcemeta::core::SchemaTransformRule {
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
schema.defines("minimum") && !schema.defines("maximum") &&
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_lower_bound_multiplier.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class IntegerLowerBoundMultiplier final
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
schema.defines("minimum") && !schema.defines("maximum") &&
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_unbound.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class IntegerUnbound final : public sourcemeta::core::SchemaTransformRule {
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
!schema.defines("minimum") && !schema.defines("maximum") &&
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_unbound_multiplier.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class IntegerUnboundMultiplier final
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
!schema.defines("minimum") && !schema.defines("maximum") &&
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_upper_bound.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class IntegerUpperBound final : public sourcemeta::core::SchemaTransformRule {
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
!schema.defines("minimum") && schema.defines("maximum") &&
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/integer_upper_bound_multiplier.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class IntegerUpperBoundMultiplier final
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("type") &&
schema.at("type").to_string() == "integer" &&
!schema.defines("minimum") && schema.defines("maximum") &&
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/mapper/number_arbitrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class NumberArbitrary final : public sourcemeta::core::SchemaTransformRule {
const sourcemeta::core::SchemaResolver &) const
-> sourcemeta::core::SchemaTransformRule::Result override {
return location.dialect == "https://json-schema.org/draft/2020-12/schema" &&
vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/validation") &&
vocabularies.contains(sourcemeta::core::Vocabularies::Known::
JSON_Schema_2020_12_Validation) &&
schema.defines("type") && schema.at("type").to_string() == "number";
}

Expand Down
2 changes: 1 addition & 1 deletion test/compiler/canonicalizer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TEST(JSONBinPack_Canonicalizer, unsupported_draft) {
EXPECT_THROW(
sourcemeta::jsonbinpack::canonicalize(
schema, sourcemeta::core::schema_official_walker, test_resolver),
sourcemeta::core::SchemaError);
sourcemeta::core::SchemaBaseDialectError);
}

TEST(JSONBinPack_Canonicalizer, unknown_draft) {
Expand Down
9 changes: 9 additions & 0 deletions vendor/core/CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/core/config.cmake.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 21 additions & 6 deletions vendor/core/src/core/json/include/sourcemeta/core/json.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 33 additions & 16 deletions vendor/core/src/core/json/include/sourcemeta/core/json_error.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions vendor/core/src/core/json/json.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading