def is_included_endpoint(path: str, method: str) -> bool:
    """Check if an endpoint should be included in the OpenAPI spec.

    Args:
        path: The path of the endpoint
        method: The HTTP method (lowercase)

    Returns:
        True if the endpoint should be included, False otherwise
    """
    # Remove trailing slash for consistency in matching
    normalized_path = path
    if normalized_path.endswith("/") and len(normalized_path) > 1:
        normalized_path = normalized_path[:-1]

    # Add trailing slash for matching with the dictionary
    path_with_slash = path
    if not path_with_slash.endswith("/"):
        path_with_slash = path_with_slash + "/"

    # Try both with and without trailing slash
    for try_path in [normalized_path, path_with_slash]:
        if try_path in INCLUDED_ENDPOINTS:
            methods = INCLUDED_ENDPOINTS[try_path]
            return method.lower() in methods and methods[method.lower()]

    return False
Check if an endpoint should be included in the OpenAPI spec.

    Args:
        path: The path of the endpoint
        method: The HTTP method (lowercase)

    Returns:
        True if the endpoint should be included, False otherwise
    
fern/scripts/api_config.py