'Return a list of keys that should be used to layout a link within
the schema document.
/users/                   ("users", "list"), ("users", "create")
/users/{pk}/              ("users", "read"), ("users", "update"), ("users", "delete")
/users/enabled/           ("users", "enabled")  # custom viewset list action
/users/{pk}/star/         ("users", "star")     # custom viewset detail action
/users/{pk}/groups/       ("users", "groups", "list"), ("users", "groups", "create")
/users/{pk}/groups/{pk}/  ("users", "groups", "read"), ("users", "groups", "update"), ("users", "groups", "delete")'

def get_keys(self, subpath, method, view):

    if hasattr(view, 'action'):
        action = view.action
    elif is_list_view(subpath, method, view):
        action = 'list'
    else:
        action = self.default_mapping[method.lower()]
    named_path_components = [component for component in subpath.strip('/').split('/') if ('{' not in component)]
    if is_custom_action(action):
        if (len(view.action_map) > 1):
            action = self.default_mapping[method.lower()]
            if (action in self.coerce_method_names):
                action = self.coerce_method_names[action]
            return (named_path_components + [action])
        else:
            return (named_path_components[:(-1)] + [action])
    if (action in self.coerce_method_names):
        action = self.coerce_method_names[action]
    return (named_path_components + [action])
