lib/elasticsearch/api/actions/cat/indices.rb in elasticsearch-api-6.1.0 vs lib/elasticsearch/api/actions/cat/indices.rb in elasticsearch-api-6.2.0

- old
+ new

@@ -50,33 +50,35 @@ # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-indices.html # def indices(arguments={}) - valid_params = [ - :bytes, - :h, - :health, - :help, - :local, - :master_timeout, - :pri, - :v, - :s ] - index = arguments.delete(:index) - method = HTTP_GET path = Utils.__pathify '_cat/indices', Utils.__listify(index) - params = Utils.__validate_and_extract_params arguments, valid_params + params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) params[:h] = Utils.__listify(params[:h]) if params[:h] 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(:indices, [ + :bytes, + :h, + :health, + :help, + :local, + :master_timeout, + :pri, + :v, + :s ].freeze) end end end end