public static boolean areSchemaTypesCompatible(final @NotNull JsonSchemaObject schema, final @NotNull JsonSchemaType type) {
    final JsonSchemaType matchingSchemaType = getMatchingSchemaType(schema, type);
    if (matchingSchemaType != null) return matchingSchemaType.equals(type);
    if (schema.getEnum() != null) {
      return PRIMITIVE_TYPES.contains(type);
    }
    return true;
  }
public static boolean areSchemaTypesCompatible(final @NotNull JsonSchemaObject schema, final @NotNull JsonSchemaType type)