lib/elasticsearch/api/actions/cat/component_templates.rb in elasticsearch-api-8.10.0 vs lib/elasticsearch/api/actions/cat/component_templates.rb in elasticsearch-api-8.11.0
- old
+ new
@@ -32,13 +32,21 @@
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
# @option arguments [Boolean] :v Verbose mode. Display column headers
# @option arguments [Hash] :headers Custom HTTP headers
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-component-templates.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.11/cat-component-templates.html
#
def component_templates(arguments = {})
+ request_opts = { endpoint: arguments[:endpoint] || "cat.component_templates" }
+
+ defined_params = [:name].inject({}) do |set_variables, variable|
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
+ set_variables
+ end
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
+
arguments = arguments.clone
headers = arguments.delete(:headers) || {}
body = nil
@@ -51,10 +59,10 @@
"_cat/component_templates"
end
params = Utils.process_params(arguments)
Elasticsearch::API::Response.new(
- perform_request(method, path, params, body, headers)
+ perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end