class Oas3Validator {

    public static ApiValidationResults validate(String apiSpecPath) throws ResolutionException {
        if (apiSpecPath == null) {
            throw new IllegalArgumentException("API definition document path is required");
        }
        File apiSpecFile = new File(apiSpecPath);
        String apiSpecFilePath = apiSpecFile.getAbsolutePath();
        System.out.println(System.lineSeparator() + "Validating API specification: " + apiSpecFilePath);
        ApiValidationResult specValidationResult = validateOpenApiSpec(apiSpecFile);
        ApiValidationResult styleValidationResult = validateOpenApiSpecStyle(apiSpecFilePath);
        boolean isSuccess = specValidationResult.isSuccess() && styleValidationResult.isSuccess();
        System.out.println("Validating API specification: " + apiSpecFilePath + " -> "
                + (isSuccess ? "SUCCESS" : "FAILED"));
        printValidationResults(specValidationResult);
        printValidationResults(styleValidationResult);
        ApiValidationResults apiValidationResults = new ApiValidationResults();
        apiValidationResults.setApiDefinitionPath(apiSpecPath);
        apiValidationResults.setSpecificationValidationResult(specValidationResult);
        apiValidationResults.setStyleValidationResult(styleValidationResult);
        return apiValidationResults;
    }

    private  Oas3Validator();

}