def METHOD_NAME(client, prefix, file_prefix=None):
    if file_prefix is None:
        file_prefix = prefix
    api_response = client.get(f"/{prefix}/api")
    check(
        api_response, error=lambda status, msg: status == http.HTTPStatus.OK.value
    )
    response_body = api_response.body.json()
    paths = response_body["paths"]
    all_methods.extend(paths.keys())
    fetched_version = response_body["info"]["version"]
    formatted_schema = json.dumps(response_body, indent=2)
    openapi_target_file = os.path.join(
        args.schema_dir, f"{file_prefix}_openapi.json"
    )
    try:
        old_schema.remove(openapi_target_file)
    except KeyError:
        pass
    with open(openapi_target_file, "a+", encoding="utf-8") as f:
        f.seek(0)
        previous = f.read()
        if previous != formatted_schema:
            file_version = "0.0.0"
            try:
                from_file = json.loads(previous)
                file_version = from_file["info"]["version"]
            except (json.JSONDecodeError, KeyError):
                pass
            if version.parse(fetched_version) > version.parse(file_version):
                LOG.debug(
                    f"Writing schema to {openapi_target_file} - overwriting {file_version} with {fetched_version}"
                )
                f.truncate(0)
                f.seek(0)
                f.write(formatted_schema)
            else:
                LOG.error(
                    f"Found differences in {openapi_target_file}, but not overwriting as retrieved version is not newer ({fetched_version} <= {file_version})"
                )
                alt_file = os.path.join(
                    args.schema_dir, f"{file_prefix}_{fetched_version}_openapi.json"
                )
                LOG.error(f"Writing to {alt_file} for comparison")
                with open(alt_file, "w", encoding="utf-8") as f2:
                    f2.write(formatted_schema)
                try:
                    old_schema.remove(alt_file)
                except KeyError:
                    pass
            changed_files.append(openapi_target_file)
        else:
            LOG.debug("Schema matches in {}".format(openapi_target_file))
    try:
        openapi_spec_validator.validate_spec(response_body)
    except Exception as e:
        LOG.error(f"Validation of {prefix} schema failed")
        LOG.error(e)
        return False
    return True