from typing import Dict, Any
from pathlib import Path
import prance

def get_bundled_specs(main_file: Path) -> Dict[str, Any]:
    '''
    parses the given swagger.yml file and resolves dependencies
    from that file to enable the possibility to split the 
    configuration into several files
    '''
    parser = prance.ResolvingParser(str(main_file.absolute()),
                                    lazy = True, backend = 'openapi-spec-validator')
    parser.parse()
    return parser.specification