private Map<String, List<JsonNode>> getFieldsFromAllParts(List<ObjectNode> parts) {
        return parts.stream()
                .flatMap(part -> StreamSupport.stream(((Iterable<Map.Entry<String, JsonNode>>) part::fields).spliterator(), false))
                .collect(Collectors.groupingBy(Map.Entry::getKey, LinkedHashMap::new, Collectors.mapping(Map.Entry::getValue, Collectors.toList())));
    }
Collect all defined attributes from the separate parts.

@param parts entries of the {@link SchemaKeyword#TAG_ALLOF} array to consider
@return flattened collection of all attributes in the given parts
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaCleanUpUtils.java