Skip to content

Commit

Permalink
# added .squeeze('/') for path
Browse files Browse the repository at this point in the history
  • Loading branch information
nhtruong committed Dec 13, 2024
1 parent 4a7f5e7 commit 216e66a
Show file tree
Hide file tree
Showing 363 changed files with 362 additions and 363 deletions.
2 changes: 1 addition & 1 deletion api_generator/lib/templates/action.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module OpenSearch
headers = args.delete('headers') || {}
body = args.delete('body')
{{/bulk_body}}
url = [{{{url_components}}}].reject(&:nil?).join('/')
url = [{{{url_components}}}].filter(&:present?).join('/').squeeze('/')
method = {{{http_verb}}}

Utils.validate_query_params args, {{valid_params_constant_name}}
Expand Down
1 change: 0 additions & 1 deletion lib/opensearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# This file is generated from the OpenSearch REST API spec.
# Do not modify it by hand. Instead, modify the generator or the spec.

require 'active_support/all'
require 'opensearch/transport'
require 'opensearch/api'
Dir[File.expand_path('opensearch/api/**/*.rb', __dir__)].sort.each { |f| require f }
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/asynchronous_search/delete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def delete(args = {})
ignore = args.delete('ignore') || []
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_plugins', '_asynchronous_search', _id].reject(&:nil?).join('/')
url = ['_plugins', '_asynchronous_search', _id].filter(&:present?).join('/').squeeze('/')
method = 'DELETE'

Utils.validate_query_params args, DELETE_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/asynchronous_search/get.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_plugins', '_asynchronous_search', _id].reject(&:nil?).join('/')
url = ['_plugins', '_asynchronous_search', _id].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, GET_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/asynchronous_search/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def search(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_plugins', '_asynchronous_search'].reject(&:nil?).join('/')
url = ['_plugins', '_asynchronous_search'].filter(&:present?).join('/').squeeze('/')
method = 'POST'

Utils.validate_query_params args, SEARCH_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/asynchronous_search/stats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def stats(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_plugins', '_asynchronous_search', 'stats'].reject(&:nil?).join('/')
url = ['_plugins', '_asynchronous_search', 'stats'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, STATS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/bulk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def bulk(args = {})

headers = (args.delete('headers') || {}).merge('Content-Type' => 'application/x-ndjson')
body = Utils.bulkify(args.delete('body'))
url = [_index, '_bulk'].reject(&:nil?).join('/')
url = [_index, '_bulk'].filter(&:present?).join('/').squeeze('/')
method = _index.present? ? 'PUT' : 'POST'

Utils.validate_query_params args, BULK_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/bulk_stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def bulk_stream(args = {})

headers = (args.delete('headers') || {}).merge('Content-Type' => 'application/x-ndjson')
body = Utils.bulkify(args.delete('body'))
url = [_index, '_bulk', 'stream'].reject(&:nil?).join('/')
url = [_index, '_bulk', 'stream'].filter(&:present?).join('/').squeeze('/')
method = _index.present? ? 'PUT' : 'POST'

Utils.validate_query_params args, BULK_STREAM_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/aliases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def aliases(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'aliases', _name].reject(&:nil?).join('/')
url = ['_cat', 'aliases', _name].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, ALIASES_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/all_pit_segments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def all_pit_segments(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'pit_segments', '_all'].reject(&:nil?).join('/')
url = ['_cat', 'pit_segments', '_all'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, ALL_PIT_SEGMENTS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/allocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def allocation(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'allocation', _node_id].reject(&:nil?).join('/')
url = ['_cat', 'allocation', _node_id].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, ALLOCATION_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/cluster_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def cluster_manager(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'cluster_manager'].reject(&:nil?).join('/')
url = ['_cat', 'cluster_manager'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, CLUSTER_MANAGER_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/count.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def count(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'count', _index].reject(&:nil?).join('/')
url = ['_cat', 'count', _index].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, COUNT_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/fielddata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def fielddata(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'fielddata', _fields].reject(&:nil?).join('/')
url = ['_cat', 'fielddata', _fields].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, FIELDDATA_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/health.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def health(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'health'].reject(&:nil?).join('/')
url = ['_cat', 'health'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, HEALTH_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/help.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def help(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat'].reject(&:nil?).join('/')
url = ['_cat'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, HELP_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/indices.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def indices(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'indices', _index].reject(&:nil?).join('/')
url = ['_cat', 'indices', _index].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, INDICES_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/master.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def master(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'master'].reject(&:nil?).join('/')
url = ['_cat', 'master'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, MASTER_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/nodeattrs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def nodeattrs(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'nodeattrs'].reject(&:nil?).join('/')
url = ['_cat', 'nodeattrs'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, NODEATTRS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/nodes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def nodes(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'nodes'].reject(&:nil?).join('/')
url = ['_cat', 'nodes'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, NODES_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/pending_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def pending_tasks(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'pending_tasks'].reject(&:nil?).join('/')
url = ['_cat', 'pending_tasks'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, PENDING_TASKS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/pit_segments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def pit_segments(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'pit_segments'].reject(&:nil?).join('/')
url = ['_cat', 'pit_segments'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, PIT_SEGMENTS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/plugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def plugins(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'plugins'].reject(&:nil?).join('/')
url = ['_cat', 'plugins'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, PLUGINS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/recovery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def recovery(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'recovery', _index].reject(&:nil?).join('/')
url = ['_cat', 'recovery', _index].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, RECOVERY_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/repositories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def repositories(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'repositories'].reject(&:nil?).join('/')
url = ['_cat', 'repositories'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, REPOSITORIES_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/segment_replication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def segment_replication(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'segment_replication', _index].reject(&:nil?).join('/')
url = ['_cat', 'segment_replication', _index].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, SEGMENT_REPLICATION_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/segments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def segments(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'segments', _index].reject(&:nil?).join('/')
url = ['_cat', 'segments', _index].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, SEGMENTS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/shards.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def shards(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'shards', _index].reject(&:nil?).join('/')
url = ['_cat', 'shards', _index].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, SHARDS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/snapshots.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def snapshots(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'snapshots', _repository].reject(&:nil?).join('/')
url = ['_cat', 'snapshots', _repository].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, SNAPSHOTS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def tasks(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'tasks'].reject(&:nil?).join('/')
url = ['_cat', 'tasks'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, TASKS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/templates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def templates(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'templates', _name].reject(&:nil?).join('/')
url = ['_cat', 'templates', _name].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, TEMPLATES_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cat/thread_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def thread_pool(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cat', 'thread_pool', _thread_pool_patterns].reject(&:nil?).join('/')
url = ['_cat', 'thread_pool', _thread_pool_patterns].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, THREAD_POOL_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/clear_scroll.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def clear_scroll(args = {})
ignore = args.delete('ignore') || []
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_search', 'scroll', _scroll_id].reject(&:nil?).join('/')
url = ['_search', 'scroll', _scroll_id].filter(&:present?).join('/').squeeze('/')
method = 'DELETE'

Utils.validate_query_params args, CLEAR_SCROLL_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cluster/allocation_explain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def allocation_explain(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cluster', 'allocation', 'explain'].reject(&:nil?).join('/')
url = ['_cluster', 'allocation', 'explain'].filter(&:present?).join('/').squeeze('/')
method = body ? 'POST' : 'GET'

Utils.validate_query_params args, ALLOCATION_EXPLAIN_QUERY_PARAMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def delete_component_template(args = {})
ignore = args.delete('ignore') || []
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_component_template', _name].reject(&:nil?).join('/')
url = ['_component_template', _name].filter(&:present?).join('/').squeeze('/')
method = 'DELETE'

Utils.validate_query_params args, DELETE_COMPONENT_TEMPLATE_QUERY_PARAMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def delete_decommission_awareness(args = {})
ignore = args.delete('ignore') || []
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cluster', 'decommission', 'awareness'].reject(&:nil?).join('/')
url = ['_cluster', 'decommission', 'awareness'].filter(&:present?).join('/').squeeze('/')
method = 'DELETE'

Utils.validate_query_params args, DELETE_DECOMMISSION_AWARENESS_QUERY_PARAMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def delete_voting_config_exclusions(args = {})
ignore = args.delete('ignore') || []
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cluster', 'voting_config_exclusions'].reject(&:nil?).join('/')
url = ['_cluster', 'voting_config_exclusions'].filter(&:present?).join('/').squeeze('/')
method = 'DELETE'

Utils.validate_query_params args, DELETE_VOTING_CONFIG_EXCLUSIONS_QUERY_PARAMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def delete_weighted_routing(args = {})
ignore = args.delete('ignore') || []
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cluster', 'routing', 'awareness', 'weights'].reject(&:nil?).join('/')
url = ['_cluster', 'routing', 'awareness', 'weights'].filter(&:present?).join('/').squeeze('/')
method = 'DELETE'

Utils.validate_query_params args, DELETE_WEIGHTED_ROUTING_QUERY_PARAMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def exists_component_template(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_component_template', _name].reject(&:nil?).join('/')
url = ['_component_template', _name].filter(&:present?).join('/').squeeze('/')
method = 'HEAD'

Utils.validate_query_params args, EXISTS_COMPONENT_TEMPLATE_QUERY_PARAMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_component_template(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_component_template', _name].reject(&:nil?).join('/')
url = ['_component_template', _name].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, GET_COMPONENT_TEMPLATE_QUERY_PARAMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_decommission_awareness(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cluster', 'decommission', 'awareness', _awareness_attribute_name, '_status'].reject(&:nil?).join('/')
url = ['_cluster', 'decommission', 'awareness', _awareness_attribute_name, '_status'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, GET_DECOMMISSION_AWARENESS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cluster/get_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_settings(args = {})
args = Utils.normalize_arguments(args)
headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cluster', 'settings'].reject(&:nil?).join('/')
url = ['_cluster', 'settings'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, GET_SETTINGS_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cluster/get_weighted_routing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_weighted_routing(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cluster', 'routing', 'awareness', _attribute, 'weights'].reject(&:nil?).join('/')
url = ['_cluster', 'routing', 'awareness', _attribute, 'weights'].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, GET_WEIGHTED_ROUTING_QUERY_PARAMS
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cluster/health.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def health(args = {})

headers = args.delete('headers') || {}
body = args.delete('body')
url = ['_cluster', 'health', _index].reject(&:nil?).join('/')
url = ['_cluster', 'health', _index].filter(&:present?).join('/').squeeze('/')
method = 'GET'

Utils.validate_query_params args, HEALTH_QUERY_PARAMS
Expand Down
Loading

0 comments on commit 216e66a

Please sign in to comment.