private boolean collectDependentRequiredNamesIfMergeAllowed(JsonNode objectNode, Map<String, Set<String>> mergedDependentRequiredNames) {
        if (!objectNode.isObject()) {
            // dependentRequired node is not an object as expected, abort merge
            return false;
        }
        Iterator<Map.Entry<String, JsonNode>> it = objectNode.fields();
        while (it.hasNext()) {
            Map.Entry<String, JsonNode> dependentRequiredFieldsOfSingleLead = it.next();
            Set<String> propertyNames = this.collectTextItemsFromArrayNode(dependentRequiredFieldsOfSingleLead.getValue());
            if (propertyNames == null) {
                // cannot consolidate when anything but an array of other plain property names is being provided
                return false;
            }
            mergedDependentRequiredNames.computeIfAbsent(dependentRequiredFieldsOfSingleLead.getKey(), leadName -> new LinkedHashSet<>())
                    .addAll(propertyNames);
        }
        return true;
    }
Iterate over the given object node's properties, expecting an array of property names on each, which should be added to the provided map.

@param objectNode single value of a {@link SchemaKeyword#TAG_DEPENDENT_REQUIRED} attribute
@param mergedDependentRequiredNames collected required property names per leading property name, that should be extended here
@return whether the given {@code objectNode} is eligible to be merged and its contents were successfully added to the given collection
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaCleanUpUtils.java