def dir_template_f(method_names: []) ->str:
    """
    generate `__dir__` method code to deliver
    a list of all methods which are mapped
    to an  API routes
    """
    method_names_ = "'" + "',\n            '".join(method_names) + "'"
    return f"""
    def __dir__(self):
        method_names = [
            {method_names_}
        ]
        return method_names
    """
