Skip to content

Commit

Permalink
Don't proceed with type_union_implicit if no validation vocabulary
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Sep 11, 2024
1 parent 98ef4a5 commit 9eece53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/linter/implicit/type_union_implicit.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class TypeUnionImplicit final : public sourcemeta::alterschema::Rule {
"http://json-schema.org/draft-00/hyper-schema#"}) &&
schema.defines("type")) {
return false;

// Don't apply if we don't have the necessary vocabularies
} else {
return false;
}

if (vocabularies.contains(
Expand Down

0 comments on commit 9eece53

Please sign in to comment.