class ApiDocReader {

    public String load(String location) {
        if (location == null || location.isEmpty()) {
            throw new ApiDocReaderException("API doc location can't be null or empty");
        }


        String openAPIJsonContent = getOpenAPIJsonContent(location.trim());
        boolean isValidJson = isValidOpenApi3Content(openAPIJsonContent);
        if (!isValidJson) {
            log.debug("Could not convert response body to an OpenAPI object");
            throw new ApiDocReaderException("OpenAPI content is not valid");
        }

        return openAPIJsonContent;
    }

}