Skip to content

Commit 06fba79

Browse files
committed
[API] Code generator: termvectors code cleanup
1 parent 1cea4b6 commit 06fba79

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

elasticsearch-api/utils/thor/templates/_method_setup.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
method = <%= @spec.http_method %>
2626
<%- if @spec.method_name == 'termvectors' %>
27-
endpoint = arguments.delete(:endpoint) || '_termvectors'
27+
arguments.delete(:endpoint)
2828
<%- end -%>
2929
path = <%= @spec.http_path %>
3030
<%- if [email protected]? || needs_ignore_404?(@spec.endpoint_name) || needs_complex_ignore_404?(@spec.endpoint_name)-%>

elasticsearch-api/utils/thor/templates/method.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ end
6363
alias_method :<%= @spec.method_name %>?, :<%= @spec.method_name %>
6464
<%- end -%>
6565
<%- if @spec.method_name == 'termvectors' %>
66-
6766
# Deprecated: Use the plural version, {#termvectors}
6867
#
6968
def termvector(arguments={})
70-
termvectors(arguments.merge endpoint: '_termvector')
69+
warn "[DEPRECATION] `termvector` is deprecated. Please use the plural version, `termvectors` instead."
70+
termvectors(arguments.merge(endpoint: '_termvector'))
7171
end
7272
<%- end -%>
7373
<%- @spec.namespace_depth.downto(1) do |i| -%>

0 commit comments

Comments
 (0)