diff --git a/src/linter/implicit/type_union_implicit.h b/src/linter/implicit/type_union_implicit.h index 85e98f8..d9c16d4 100644 --- a/src/linter/implicit/type_union_implicit.h +++ b/src/linter/implicit/type_union_implicit.h @@ -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; }