private Supplier<? extends JsonNode> getAllOfMergeFunctionFor(SchemaKeyword keyword, List<JsonNode> valuesToMerge,
            Map<String, SchemaKeyword> reverseKeywordMap) {
        if (valuesToMerge.size() == 1) {
            // no conflicts, no further checks
            return () -> valuesToMerge.get(0);
        }
        BiFunction<List<JsonNode>, Map<String, SchemaKeyword>, Supplier<? extends JsonNode>> specificMergeFunction =
                this.allOfMergeFunctions.get(keyword);
        if (specificMergeFunction == null) {
            return this.returnOneIfAllEqual(valuesToMerge);
        }
        return specificMergeFunction.apply(valuesToMerge, reverseKeywordMap);
    }
Check whether the given schema node and its {@link SchemaKeyword#TAG_ALLOF} elements (if there are any) are distinct. If yes, remove the
{@link SchemaKeyword#TAG_ALLOF} node and merge all its elements with the given schema node instead.
<br>
This makes for more readable schemas being generated but has the side-effect that manually added {@link SchemaKeyword#TAG_ALLOF} (e.g. from a
custom definition or attribute overrides) may be removed as well if it isn't strictly speaking necessary.

@param schemaNode single node representing a sub-schema to consolidate contained {@link SchemaKeyword#TAG_ALLOF} for (if present)
@param allOfTagName name of the {@link SchemaKeyword#TAG_ALLOF} in the designated JSON Schema version
@param reverseKeywordMap mapping from actual tag name in generated schema to underlying {@link SchemaKeyword}
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaCleanUpUtils.java