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
…234)

Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Sep 11, 2024
1 parent 98ef4a5 commit 744cf03
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/linter/implicit/type_union_implicit.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ class TypeUnionImplicit final : public sourcemeta::alterschema::Rule {
"http://json-schema.org/draft-03/schema#",
"http://json-schema.org/draft-02/hyper-schema#",
"http://json-schema.org/draft-01/hyper-schema#",
"http://json-schema.org/draft-00/hyper-schema#"}) &&
schema.defines("type")) {
"http://json-schema.org/draft-00/hyper-schema#"})) {
if (schema.defines("type")) {
return false;
}

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

Expand Down

0 comments on commit 744cf03

Please sign in to comment.