File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
lib/elasticsearch/api/actions/connector
spec/elasticsearch/api/actions/connector Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,15 @@ module Actions
29
29
# support SLA of official GA features.
30
30
#
31
31
# @option arguments [Hash] :headers Custom HTTP headers
32
- # @option arguments [Hash] :body The connector configuration.
32
+ # @option arguments [Hash] :body The connector configuration. (*Required*)
33
33
#
34
34
# @see https://www.elastic.co/guide/en/enterprise-search/8.12/connectors.html
35
35
#
36
36
def post ( arguments = { } )
37
37
request_opts = { endpoint : arguments [ :endpoint ] || "connector.post" }
38
38
39
+ raise ArgumentError , "Required argument 'body' missing" unless arguments [ :body ]
40
+
39
41
arguments = arguments . clone
40
42
headers = arguments . delete ( :headers ) || { }
41
43
Original file line number Diff line number Diff line change 23
23
'POST' ,
24
24
'_connector' ,
25
25
{ } ,
26
- nil ,
26
+ { } ,
27
27
{ } ,
28
28
{ endpoint : 'connector.post' }
29
29
]
30
30
end
31
31
32
32
it 'performs the request' do
33
- expect ( client_double . connector . post ( connector_id : 'foo' ) ) . to be_a Elasticsearch ::API ::Response
33
+ expect ( client_double . connector . post ( connector_id : 'foo' , body : { } ) ) . to be_a Elasticsearch ::API ::Response
34
34
end
35
35
end
You can’t perform that action at this time.
0 commit comments