import re


def clean_resolver_url_pattern(route: str) -> str:
    """Cleans the full url path pattern from a url resolver into a OpenAPI schema url pattern.

    Args:
        route (str): Full URL path pattern including any prefixed paths.

    Returns:
        str: OpenAPI path format

    Example::

        >>clean_resolver_url_pattern("toy/%(toyId)s/uploadImage")
        toy/{toyId}/uploadImage

    """
    return re.sub(r"\%\(([a-zA-Z0-9\-\_]*)\)s", r"{\1}", route)