private Map<String, Map.Entry<String, File>> getDependencyMap(List<File> serviceSpecFiles, List<File> profileFiles)
            throws HyscaleException {
        Map<String, Entry<String, File>> serviceVsProfile = new HashMap<>();
        List<String> invalidServiceList = new ArrayList<>();
        if (profileFiles != null && !profileFiles.isEmpty()) {
            for (File profileFile : profileFiles) {
                String profileName = ServiceProfileUtil.getProfileName(profileFile);
                String serviceName = ServiceProfileUtil.getServiceNameFromProfile(profileFile);
                if (serviceVsProfile.get(serviceName) != null) {
                    // Multiple profiles for a single service
                    invalidServiceList.add(serviceName);
                }
                serviceVsProfile.put(serviceName, new SimpleEntry<>(profileName, profileFile));
            }
        }

        if (!invalidServiceList.isEmpty()) {
            String invalidServices = invalidServiceList.toString();
            logger.error("Multiple profiles found for services {}", invalidServices);
            throw new HyscaleException(ControllerErrorCodes.UNIQUE_PROFILE_REQUIRED, invalidServices);
        }

        Map<String, File> serviceVsSpecFile = new HashMap<>();

        for (File serviceSpecFile : serviceSpecFiles) {
            serviceVsSpecFile.put(ServiceSpecUtil.getServiceName(serviceSpecFile), serviceSpecFile);
        }

        // Services specified in profile not found
        invalidServiceList = serviceVsProfile.entrySet().stream().map(Entry::getKey)
                .filter(service -> !serviceVsSpecFile.containsKey(service)).collect(Collectors.toList());

        if (invalidServiceList != null && !invalidServiceList.isEmpty()) {
            String invalidServices = invalidServiceList.toString();
            logger.error("Services {} mentioned in profiles not available in deployment", invalidServices);
            throw new HyscaleException(ControllerErrorCodes.SERVICES_NOT_PROVIDED_FOR_PROFILE, invalidServices);
        }
        return serviceVsProfile;
    }
For each service spec file, read service spec data
if profile available for service spec
uses {@link EffectiveServiceSpecBuilder} to merge profile and spec
to get updated service spec data

Uses service spec data to create {@link ServiceSpec}

@param serviceSpecFiles
@param serviceVsProfile
@return List of {@link EffectiveServiceSpec}
@throws HyscaleException
workflow-controller/controller-service/src/main/java/io/hyscale/controller/provider/EffectiveServiceSpecProvider.java