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

- old
+ new

@@ -44,30 +44,28 @@ # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-aliases.html # def aliases(arguments={}) - valid_params = [ - :local, - :master_timeout, - :h, - :help, - :v, - :s ] - name = arguments.delete(:name) - method = HTTP_GET - path = Utils.__pathify '_cat/aliases', Utils.__listify(name) - - 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(:aliases, [ + :local, + :master_timeout, + :h, + :help, + :v, + :s ].freeze) end end end end