def annotate_routes(router, prefix):
    """
    Annotate klein routes for compatibility with autoflask generator.
    """
    router.static_path = ''
    router.view_functions = router.endpoints
    for rule in router.url_map.iter_rules():
        rule.doc_prefix = prefix
