lib/elasticsearch/api/actions/tasks/list.rb in elasticsearch-api-6.1.0 vs lib/elasticsearch/api/actions/tasks/list.rb in elasticsearch-api-6.2.0

- old
+ new

@@ -20,29 +20,31 @@ # @option arguments [Boolean] :wait_for_completion Wait for the matching tasks to complete (default: false) # # @see http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks-list.html # def list(arguments={}) - valid_params = [ - :node_id, - :actions, - :detailed, - :parent_node, - :parent_task, - :group_by, - :wait_for_completion ] - arguments = arguments.clone - task_id = arguments.delete(:task_id) method = 'GET' path = Utils.__pathify( '_tasks', Utils.__escape(task_id) ) - params = Utils.__validate_and_extract_params arguments, valid_params + params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body).body end + + # Register this action with its valid params when the module is loaded. + # + # @since 6.2.0 + ParamsRegistry.register(:list, [ + :node_id, + :actions, + :detailed, + :parent_node, + :parent_task, + :group_by, + :wait_for_completion ].freeze) end end end end