Yields merge rules as key-value pairs, in which the first element is a JSON path as a tuple, and the second element
    is a list of merge properties whose values are `true`.

def _get_merge_rules(properties, path=None):
    """
    Yields merge rules as key-value pairs, in which the first element is a JSON path as a tuple, and the second element
    is a list of merge properties whose values are `true`.
    """
    if path is None:
        path = ()

    for key, value in properties.items():
        new_path = path + (key,)
        types = _get_types(value)

        # `omitWhenMerged` supersedes all other rules.
        # See http://standard.open-contracting.org/1.1-dev/en/schema/merging/#omit-when-merged
        if value.get('omitWhenMerged') or value.get('mergeStrategy') == 'ocdsOmit':
            yield (new_path, {'omitWhenMerged'})
        # `wholeListMerge` supersedes any nested rules.
        # See http://standard.open-contracting.org/1.1-dev/en/schema/merging/#whole-list-merge
        elif 'array' in types and (value.get('wholeListMerge') or value.get('mergeStrategy') == 'ocdsVersion'):
            yield (new_path, {'wholeListMerge'})
        elif 'object' in types and 'properties' in value:
            yield from _get_merge_rules(value['properties'], path=new_path)
        elif 'array' in types and 'items' in value:
            item_types = _get_types(value['items'])
            # See http://standard.open-contracting.org/1.1-dev/en/schema/merging/#objects
            if any(item_type != 'object' for item_type in item_types):
                yield (new_path, {'wholeListMerge'})
            elif 'object' in item_types and 'properties' in value['items']:
                # See http://standard.open-contracting.org/1.1-dev/en/schema/merging/#whole-list-merge
                if 'id' not in value['items']['properties']:
                    yield (new_path, {'wholeListMerge'})
                else:
                    yield from _get_merge_rules(value['items']['properties'], path=new_path)