utils/thor/templates/_method_setup.erb in elasticsearch-api-8.12.2 vs utils/thor/templates/_method_setup.erb in elasticsearch-api-8.13.0
- old
+ new
@@ -16,22 +16,22 @@
# specific language governing permissions and limitations
# under the License.
%>
<%- @spec.path_parts.each do |name, _| %>
<%- unless @spec.method_name == 'get_field_mapping' && name == 'fields' %>
- <%= ' '*(@spec.namespace_depth+3) + "_#{name}" %> = arguments.delete(:<%=name %>)
+ <%= "_#{name}" %> = arguments.delete(:<%=name %>)
<%- end -%>
<%- end -%>
-<%= ' '*(@spec.namespace_depth+4) %>method = <%= @spec.http_method %>
+method = <%= @spec.http_method %>
<%- if @spec.method_name == 'termvectors' %>
- endpoint = arguments.delete(:endpoint) || '_termvectors'
+ arguments.delete(:endpoint)
<%- end -%>
-<%= ' '*(@spec.namespace_depth+4) %>path = <%= @spec.http_path %>
+path = <%= @spec.http_path %>
<%- if !@spec.params.empty? || needs_ignore_404?(@spec.endpoint_name) || needs_complex_ignore_404?(@spec.endpoint_name)-%>
- <%= ' '*(@spec.namespace_depth+4) %>params = Utils.process_params(arguments)
+ params = Utils.process_params(arguments)
<%- else -%>
- <%= ' '*(@spec.namespace_depth+4) %>params = {}
+ params = {}
<%- end -%>
<%- @spec.specific_params.each do |param| -%>
<%= param %>
<%- end -%>