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
2929 # support SLA of official GA features.
3030 #
3131 # @option arguments [Hash] :headers Custom HTTP headers
32- # @option arguments [Hash] :body The connector configuration.
32+ # @option arguments [Hash] :body The connector configuration. (*Required*)
3333 #
3434 # @see https://www.elastic.co/guide/en/enterprise-search/8.12/connectors.html
3535 #
3636 def post ( arguments = { } )
3737 request_opts = { endpoint : arguments [ :endpoint ] || "connector.post" }
3838
39+ raise ArgumentError , "Required argument 'body' missing" unless arguments [ :body ]
40+
3941 arguments = arguments . clone
4042 headers = arguments . delete ( :headers ) || { }
4143
Original file line number Diff line number Diff line change 2323 'POST' ,
2424 '_connector' ,
2525 { } ,
26- nil ,
26+ { } ,
2727 { } ,
2828 { endpoint : 'connector.post' }
2929 ]
3030 end
3131
3232 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
3434 end
3535end
You can’t perform that action at this time.
0 commit comments