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

- old
+ new

@@ -25,27 +25,28 @@ # # @see http://www.elasticsearch.org/guide/reference/api/admin-indices-open-close/ # def open(arguments={}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] - - valid_params = [ - :ignore_indices, - :ignore_unavailable, - :allow_no_indices, - :expand_wildcards, - :timeout, - :wait_for_active_shards - ] - method = HTTP_POST path = Utils.__pathify Utils.__escape(arguments[:index]), '_open' - 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(:open, [ + :ignore_indices, + :ignore_unavailable, + :allow_no_indices, + :expand_wildcards, + :timeout, + :wait_for_active_shards ].freeze) end end end end