def make_endpoints(version, name, endpoints, kwargs=None):
    """
    Returns a redirect handler and all endpoints with a version prefix added.

    :param version: the application version
    :param name: the application name
    :param endpoints: a list of application endpoints
    :param kwargs: an optional dictionary to populate placeholders in endpoints
    :returns:list of endpoints
    """
    if kwargs is None:
        kwargs = {}

    version_url_prefix = '/v{}/{}'.format(version.split('.')[0], name)
    yield (r"/", RedirectHandler, {"url": r"{}".format(version_url_prefix)})
    for endpoint in add_prefix(endpoints, version_url_prefix, kwargs):
        yield endpoint
Returns a redirect handler and all endpoints with a version prefix added.

    :param version: the application version
    :param name: the application name
    :param endpoints: a list of application endpoints
    :param kwargs: an optional dictionary to populate placeholders in endpoints
    :returns:list of endpoints