Skip to content

Commit 53ce5d3

Browse files
committed
[API] Updates APIs
1 parent 5700678 commit 53ce5d3

File tree

10 files changed

+10
-23
lines changed

10 files changed

+10
-23
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ module Actions
3333
#
3434
def clear_repositories_metering_archive(arguments = {})
3535
raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id]
36-
37-
raise ArgumentError,
38-
"Required argument 'max_archive_version' missing" unless arguments[:max_archive_version]
36+
raise ArgumentError, "Required argument 'max_archive_version' missing" unless arguments[:max_archive_version]
3937

4038
headers = arguments.delete(:headers) || {}
4139

elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module Actions
2525
# @option arguments [String] :routing Specific routing value
2626
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
2727
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
28-
# @option arguments [String] :keep_alive Specific the time to live for the point in time
28+
# @option arguments [String] :keep_alive Specific the time to live for the point in time (*Required*)
2929
# @option arguments [Hash] :headers Custom HTTP headers
3030
#
3131
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.16/point-in-time-api.html

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ def put_job(arguments = {})
4444

4545
method = Elasticsearch::API::HTTP_PUT
4646
path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}"
47-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
48-
ParamsRegistry.get(__method__)
47+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
4948

5049
body = arguments[:body]
5150
perform_request(method, path, params, body, headers).body

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/machine_learning/put_trained_model.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ def put_trained_model(arguments = {})
4141

4242
method = Elasticsearch::API::HTTP_PUT
4343
path = "_ml/trained_models/#{Elasticsearch::API::Utils.__listify(_model_id)}"
44-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
45-
ParamsRegistry.get(__method__)
44+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
4645

4746
body = arguments[:body]
4847
perform_request(method, path, params, body, headers).body

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/machine_learning/reset_job.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ def reset_job(arguments = {})
3939

4040
method = Elasticsearch::API::HTTP_POST
4141
path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_reset"
42-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
43-
ParamsRegistry.get(__method__)
42+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
4443

4544
body = nil
4645
perform_request(method, path, params, body, headers).body

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/security/get_role.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ def get_role(arguments = {})
4444

4545
body = nil
4646
if Array(arguments[:ignore]).include?(404)
47-
Elasticsearch::API::Utils.__rescue_from_not_found {
48-
perform_request(method, path, params, body, headers).body
49-
}
47+
Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
5048
else
5149
perform_request(method, path, params, body, headers).body
5250
end

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/security/get_user.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ def get_user(arguments = {})
4444

4545
body = nil
4646
if Array(arguments[:ignore]).include?(404)
47-
Elasticsearch::API::Utils.__rescue_from_not_found {
48-
perform_request(method, path, params, body, headers).body
49-
}
47+
Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
5048
else
5149
perform_request(method, path, params, body, headers).body
5250
end

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/sql/query.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ def query(arguments = {})
3737

3838
method = Elasticsearch::API::HTTP_POST
3939
path = "_sql"
40-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
41-
ParamsRegistry.get(__method__)
40+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
4241

4342
body = arguments[:body]
4443
perform_request(method, path, params, body, headers).body

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/transform/upgrade_transforms.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ def upgrade_transforms(arguments = {})
3434

3535
method = Elasticsearch::API::HTTP_POST
3636
path = "_transform/_upgrade"
37-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
38-
ParamsRegistry.get(__method__)
37+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
3938

4039
body = nil
4140
perform_request(method, path, params, body, headers).body

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/watcher/delete_watch.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ def delete_watch(arguments = {})
4242

4343
body = nil
4444
if Array(arguments[:ignore]).include?(404)
45-
Elasticsearch::API::Utils.__rescue_from_not_found {
46-
perform_request(method, path, params, body, headers).body
47-
}
45+
Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
4846
else
4947
perform_request(method, path, params, body, headers).body
5048
end

0 commit comments

Comments
 (0)