public HyscaleInputSpec process(ProfileArg profileArg, List<File> serviceSpecFiles) throws HyscaleException {
        List<File> profiles = null;
        boolean strict = false;
        if (profileArg != null) {
            if (StringUtils.isNotBlank(profileArg.getProfileName())) {
                profiles = profileLocator.locateProfiles(profileArg.getProfileName(), serviceSpecFiles);
                strict = true;
            } else {
                profiles = profileArg.getProfiles();
            }
        }
        if (!profileSpecInputValidator.validate(profiles)) {
            throw new HyscaleException(ControllerErrorCodes.PROFILE_VALIDATION_FAILED);
        }
        checkForServiceDependency(serviceSpecFiles, profiles, strict);
        HyscaleInputSpec hyscaleInputSpec = new HyscaleInputSpec();
        hyscaleInputSpec.setServiceSpecFiles(serviceSpecFiles);
        hyscaleInputSpec.setProfileFiles(profiles);
        return hyscaleInputSpec;
    }
Processes the profile arg , validates the profile schema
and validates service dependency on profiles like
multiple profiles or missing profiles
workflow-controller/controller-service/src/main/java/io/hyscale/controller/profile/ProfileSpecProcessor.java