Skip to content

Commit

Permalink
[API] Updates the generated code with the new order for arguments.clone
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed Apr 4, 2022
1 parent fdad456 commit 05276b0
Show file tree
Hide file tree
Showing 393 changed files with 556 additions and 947 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ module Actions
def delete(arguments = {})
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_id = arguments.delete(:id)

method = Elasticsearch::API::HTTP_DELETE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ module Actions
def get(arguments = {})
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_id = arguments.delete(:id)

method = Elasticsearch::API::HTTP_GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ module Actions
def status(arguments = {})
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_id = arguments.delete(:id)

method = Elasticsearch::API::HTTP_GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
#
def submit(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = arguments.delete(:body)

arguments = arguments.clone
body = arguments.delete(:body)

_index = arguments.delete(:index)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ module Actions
def delete_autoscaling_policy(arguments = {})
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_name = arguments.delete(:name)

method = Elasticsearch::API::HTTP_DELETE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
#
def get_autoscaling_capacity(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

method = Elasticsearch::API::HTTP_GET
path = "_autoscaling/capacity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ module Actions
def get_autoscaling_policy(arguments = {})
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_name = arguments.delete(:name)

method = Elasticsearch::API::HTTP_GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ def put_autoscaling_policy(arguments = {})
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = arguments.delete(:body)

arguments = arguments.clone

_name = arguments.delete(:name)

method = Elasticsearch::API::HTTP_PUT
Expand Down
5 changes: 2 additions & 3 deletions elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ module Actions
def bulk(arguments = {})
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = arguments.delete(:body)

arguments = arguments.clone
body = arguments.delete(:body)

_index = arguments.delete(:index)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html
#
def aliases(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_name = arguments.delete(:name)

method = Elasticsearch::API::HTTP_GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html
#
def allocation(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_node_id = arguments.delete(:node_id)

method = Elasticsearch::API::HTTP_GET
Expand Down
5 changes: 2 additions & 3 deletions elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html
#
def count(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

_index = arguments.delete(:index)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html
#
def fielddata(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_fields = arguments.delete(:fields)

method = Elasticsearch::API::HTTP_GET
Expand Down
5 changes: 2 additions & 3 deletions elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html
#
def health(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

method = Elasticsearch::API::HTTP_GET
path = "_cat/health"
Expand Down
5 changes: 2 additions & 3 deletions elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html
#
def help(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

method = Elasticsearch::API::HTTP_GET
path = "_cat"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html
#
def indices(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

_index = arguments.delete(:index)

Expand Down
5 changes: 2 additions & 3 deletions elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html
#
def master(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

method = Elasticsearch::API::HTTP_GET
path = "_cat/master"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ module Actions
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html
#
def ml_data_frame_analytics(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_id = arguments.delete(:id)

method = Elasticsearch::API::HTTP_GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ module Actions
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html
#
def ml_datafeeds(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_datafeed_id = arguments.delete(:datafeed_id)

method = Elasticsearch::API::HTTP_GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ module Actions
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html
#
def ml_jobs(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_job_id = arguments.delete(:job_id)

method = Elasticsearch::API::HTTP_GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html
#
def ml_trained_models(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone

_model_id = arguments.delete(:model_id)

method = Elasticsearch::API::HTTP_GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html
#
def nodeattrs(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

method = Elasticsearch::API::HTTP_GET
path = "_cat/nodeattrs"
Expand Down
5 changes: 2 additions & 3 deletions elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html
#
def nodes(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

method = Elasticsearch::API::HTTP_GET
path = "_cat/nodes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
#
def pending_tasks(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

method = Elasticsearch::API::HTTP_GET
path = "_cat/pending_tasks"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html
#
def plugins(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

method = Elasticsearch::API::HTTP_GET
path = "_cat/plugins"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html
#
def recovery(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

_index = arguments.delete(:index)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html
#
def repositories(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

method = Elasticsearch::API::HTTP_GET
path = "_cat/repositories"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
#
def segments(arguments = {})
arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

arguments = arguments.clone
body = nil

_index = arguments.delete(:index)

Expand Down
Loading

0 comments on commit 05276b0

Please sign in to comment.