utils/thor/templates/_method_setup.erb in elasticsearch-api-8.7.1 vs utils/thor/templates/_method_setup.erb in elasticsearch-api-8.8.0

- old
+ new

@@ -14,13 +14,10 @@ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. %> -<%- if @method_name == 'search' -%> - arguments[:index] = UNDERSCORE_ALL if ! arguments[:index] && arguments[:type] -<%- end -%> <%- @parts.each do |name, _| %> <%- unless @method_name == 'get_field_mapping' && name == 'fields' %> <%= ' '*(@namespace_depth+3) + "_#{name}" %> = arguments.delete(:<%=name %>) <%- end -%> <%- end -%> @@ -28,10 +25,10 @@ <%= ' '*(@namespace_depth+4) %>method = <%= @http_method %> <%- if @method_name == 'termvectors' %> endpoint = arguments.delete(:endpoint) || '_termvectors' <%- end -%> <%= ' '*(@namespace_depth+4) %>path = <%= @http_path %> -<%- unless @params.empty? -%> +<%- if !@params.empty? || needs_ignore_404?(@endpoint_name) || needs_complex_ignore_404?(@endpoint_name)-%> <%= ' '*(@namespace_depth+4) %>params = Utils.process_params(arguments) <%- else -%> <%= ' '*(@namespace_depth+4) %>params = {} <%- end -%> <%- @specific_params.each do |param| -%>