|
|
@@ -31,7 +31,9 @@ module Elasticsearch
|
|
|
<%- @spec['url']['parts'].select { |name, info| info['required'] }.each do |name, info| -%>
|
|
|
<%= ' '*(@namespace_depth+1) + "raise ArgumentError, \"Required argument '#{name}' missing\" unless arguments[:#{name}]" + "\n" -%>
|
|
|
<%- end -%>
|
|
|
- <%= ' '*(@namespace_depth+1) + "raise ArgumentError, \"Required argument 'body' missing\" unless arguments[:body]" + "\n" if @spec['body'] && @spec['body']['required'] -%>
|
|
|
+<%- if @spec['body'] && @spec['body']['required'] -%>
|
|
|
+ <%= ' '*(@namespace_depth+1) + "raise ArgumentError, \"Required argument 'body' missing\" unless arguments[:body]" + "\n" -%>
|
|
|
+<%- end -%>
|
|
|
<%# Method, path, params, body -%>
|
|
|
<%= ' '*@namespace_depth %> method = '<%= @spec['methods'].first %>'
|
|
|
<%- unless @spec['url']['parts'].empty? -%>
|