Skip to content

Commit 90c9d98

Browse files
authored
Upgrade Core to 428cbdf92f6330b0f6ae918ac0a9dce089a0470b (#883)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 346fccd commit 90c9d98

142 files changed

Lines changed: 2004 additions & 706 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DEPENDENCIES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vendorpull https://github.com/sourcemeta/vendorpull 1dcbac42809cf87cb5b045106b863e17ad84ba02
2-
core https://github.com/sourcemeta/core bb1c78e8fa148a2ece951bb776798a43fe328821
2+
core https://github.com/sourcemeta/core 428cbdf92f6330b0f6ae918ac0a9dce089a0470b
33
jsonschema-test-suite https://github.com/json-schema-org/JSON-Schema-Test-Suite 60755c1097769e313fae3ec4d63bcc9d49b5d2d5
44
jsonschema-2020-12 https://github.com/json-schema-org/json-schema-spec 769daad75a9553562333a8937a187741cb708c72
55
jsonschema-2019-09 https://github.com/json-schema-org/json-schema-spec 41014ea723120ce70b314d72f863c6929d9f3cfd

src/alterschema/canonicalizer/dependencies_to_any_of.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class DependenciesToAnyOf final : public SchemaTransformRule {
2222
const auto *dependencies{schema.try_at("dependencies")};
2323
ONLY_CONTINUE_IF(dependencies && dependencies->is_object());
2424

25-
ONLY_CONTINUE_IF(
26-
std::ranges::any_of(dependencies->as_object(), [](const auto &entry) {
25+
ONLY_CONTINUE_IF(std::ranges::any_of(
26+
dependencies->as_object(), [](const auto &entry) -> auto {
2727
return is_schema(entry.second) || entry.second.is_array();
2828
}));
2929
return true;

src/alterschema/canonicalizer/dependencies_to_extends_disallow.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class DependenciesToExtendsDisallow final : public SchemaTransformRule {
2121
const auto *dependencies{schema.try_at("dependencies")};
2222
ONLY_CONTINUE_IF(dependencies && dependencies->is_object());
2323

24-
ONLY_CONTINUE_IF(
25-
std::ranges::any_of(dependencies->as_object(), [](const auto &entry) {
24+
ONLY_CONTINUE_IF(std::ranges::any_of(
25+
dependencies->as_object(), [](const auto &entry) -> auto {
2626
return is_schema(entry.second) || entry.second.is_array() ||
2727
entry.second.is_string();
2828
}));

src/alterschema/canonicalizer/dependent_required_to_any_of.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class DependentRequiredToAnyOf final : public SchemaTransformRule {
2626

2727
ONLY_CONTINUE_IF(std::ranges::any_of(
2828
dependent_required->as_object(),
29-
[](const auto &entry) { return entry.second.is_array(); }));
29+
[](const auto &entry) -> auto { return entry.second.is_array(); }));
3030

3131
if (!vocabularies.contains_any(
3232
{Vocabularies::Known::JSON_Schema_2019_09_Applicator,

src/alterschema/canonicalizer/implicit_contains_keywords.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ class ImplicitContainsKeywords final : public SchemaTransformRule {
2828
} else {
2929
ONLY_CONTINUE_IF(!schema.defines("minContains") &&
3030
!schema.defines("maxContains"));
31-
ONLY_CONTINUE_IF(!WALK_UP_IN_PLACE_APPLICATORS(
32-
root, frame, location, walker, resolver,
33-
[](const JSON &ancestor,
34-
const Vocabularies &ancestor_vocabularies) {
35-
return ancestor.defines("unevaluatedItems") &&
36-
ancestor_vocabularies.contains(
37-
Vocabularies::Known::
38-
JSON_Schema_2020_12_Unevaluated);
39-
})
40-
.has_value());
31+
ONLY_CONTINUE_IF(
32+
!WALK_UP_IN_PLACE_APPLICATORS(
33+
root, frame, location, walker, resolver,
34+
[](const JSON &ancestor,
35+
const Vocabularies &ancestor_vocabularies) -> bool {
36+
return ancestor.defines("unevaluatedItems") &&
37+
ancestor_vocabularies.contains(
38+
Vocabularies::Known::
39+
JSON_Schema_2020_12_Unevaluated);
40+
})
41+
.has_value());
4142
}
4243

4344
return true;

src/alterschema/canonicalizer/items_implicit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ItemsImplicit final : public SchemaTransformRule {
4141
!WALK_UP_IN_PLACE_APPLICATORS(
4242
root, frame, location, walker, resolver,
4343
[](const JSON &ancestor,
44-
const Vocabularies &ancestor_vocabularies) {
44+
const Vocabularies &ancestor_vocabularies) -> bool {
4545
return ancestor.defines("unevaluatedItems") &&
4646
ancestor_vocabularies.contains_any(
4747
{Vocabularies::Known::JSON_Schema_2020_12_Unevaluated,

src/alterschema/canonicalizer/type_inherit_in_place.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ class TypeInheritInPlace final : public SchemaTransformRule {
5151
// rules may want to lift type out of conjunctions
5252
const auto ancestor{WALK_UP(
5353
root, frame, location, walker, resolver,
54-
[](const SchemaKeywordType keyword_type) {
54+
[](const SchemaKeywordType keyword_type) -> bool {
5555
return IS_IN_PLACE_APPLICATOR(keyword_type) &&
5656
keyword_type != SchemaKeywordType::ApplicatorElementsInPlace;
5757
},
58-
[](const JSON &ancestor_schema, const Vocabularies &) {
58+
[](const JSON &ancestor_schema, const Vocabularies &) -> bool {
5959
return ancestor_schema.defines("type");
6060
})};
6161

src/alterschema/canonicalizer/unsatisfiable_type_and_enum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class UnsatisfiableTypeAndEnum final : public SchemaTransformRule {
4444
declared_types.test(std::to_underlying(JSON::Type::Integer))};
4545
ONLY_CONTINUE_IF(std::ranges::none_of(
4646
enum_value->as_array(),
47-
[&declared_types, integer_matches_integral](const auto &value) {
47+
[&declared_types, integer_matches_integral](const auto &value) -> auto {
4848
return declared_types.test(std::to_underlying(value.type())) ||
4949
(integer_matches_integral && value.is_integral());
5050
}));

src/alterschema/common/content_schema_without_media_type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class ContentSchemaWithoutMediaType final : public SchemaTransformRule {
22
private:
3+
// NOLINTNEXTLINE(bugprone-throwing-static-initialization)
34
static inline const std::string KEYWORD{"contentSchema"};
45

56
public:

src/alterschema/common/dependencies_property_tautology.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class DependenciesPropertyTautology final : public SchemaTransformRule {
3838
ONLY_CONTINUE_IF(properties && properties->is_object());
3939

4040
ONLY_CONTINUE_IF(std::ranges::any_of(
41-
properties->as_object(), [dependencies](const auto &entry) {
41+
properties->as_object(), [dependencies](const auto &entry) -> auto {
4242
if (!entry.second.is_object()) {
4343
return false;
4444
}
@@ -58,7 +58,7 @@ class DependenciesPropertyTautology final : public SchemaTransformRule {
5858
ONLY_CONTINUE_IF(required && required->is_array());
5959

6060
ONLY_CONTINUE_IF(std::ranges::any_of(
61-
required->as_array(), [dependencies](const auto &element) {
61+
required->as_array(), [dependencies](const auto &element) -> auto {
6262
if (!element.is_string()) {
6363
return false;
6464
}
@@ -70,7 +70,7 @@ class DependenciesPropertyTautology final : public SchemaTransformRule {
7070

7171
auto transform(JSON &schema, const Result &result) const -> void override {
7272
const bool is_draft_3_path{
73-
std::ranges::any_of(result.locations, [](const auto &pointer) {
73+
std::ranges::any_of(result.locations, [](const auto &pointer) -> auto {
7474
return pointer.size() == 1 && pointer.at(0).is_property() &&
7575
pointer.at(0).to_property() == "properties";
7676
})};

0 commit comments

Comments
 (0)