private Supplier<JsonNode> returnOverlapOfStringsOrStringArrays(List<JsonNode> nodes) {
        List<String> encounteredValues = this.getStringValuesFromStringOrStringArray(nodes.get(0));
        if (encounteredValues == null) {
            return null;
        }
        for (JsonNode nextNode : nodes.subList(1, nodes.size())) {
            List<String> nextValues = this.getStringValuesFromStringOrStringArray(nextNode);
            if (nextValues == null) {
                // invalid node; abort merge
                return null;
            }
            encounteredValues.retainAll(nextValues);
            if (encounteredValues.isEmpty()) {
                // invalid merge result: no valid value remained; abort merge
                return null;
            }
        }
        if (encounteredValues.size() == 1) {
            return () -> new TextNode(encounteredValues.get(0));
        }
        return () -> {
            ArrayNode arrayNode = this.config.createArrayNode();
            encounteredValues.stream().map(TextNode::new).forEach(arrayNode::add);
            return arrayNode;
        };
    }
Check whether the merging of the given node and it's allOf entries should be skipped due to a {@link SchemaKeyword#TAG_REF} being present.
Drafts 6 and 7 would ignore any other attributes besides the {@link SchemaKeyword#TAG_REF}.

@param mainNode the main node containing an {@link SchemaKeyword#TAG_ALLOF} array (maybe {@code null})
@param parts entries of the {@link SchemaKeyword#TAG_ALLOF} array to consider
@param fieldsFromAllParts flattened collection of all attributes in the given parts
@return whether to block merging of the given {@link SchemaKeyword#TAG_ALLOF} candidate
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaCleanUpUtils.java