def generate_paths(data, path=''):
    """Iterate the json schema file and generate a list of all of the
    XPath-like expression for each primitive value. An asterisk * represents
    an array of items."""
    paths = []
    if isinstance(data, dict):
        if len(data) == 0:
            paths.append(f'{path}')
        else:
            for key, val in data.items():
                if key == 'type':
                    if isinstance(val, list):
                        types = set(val)
                    else:
                        types = {val}
                    if types.isdisjoint({'object', 'array'}):
                        paths.append(f'{path}')
                elif key == 'properties':
                    paths.extend(generate_paths(val, path))
                else:
                    if key == 'items':
                        key = '*'
                    paths.extend(generate_paths(val, f'{path}/{key}'))
    return paths