Patch deprecated parameters (#851)
* Updated code generation * API generation * API generation * Updated code generation
This commit is contained in:
committed by
delvedor
parent
cc0dc10c64
commit
597dd28340
@ -29,7 +29,6 @@ function buildSearchTemplate (opts) {
|
||||
* Perform a [search_template](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
|
||||
*
|
||||
* @param {list} index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {list} type - A comma-separated list of document types to search; leave empty to perform the operation on all types
|
||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
||||
* @param {boolean} ignore_throttled - Whether specified concrete, expanded or aliased indices should be ignored when throttled
|
||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
||||
@ -98,12 +97,6 @@ function buildSearchTemplate (opts) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
@ -111,7 +104,7 @@ function buildSearchTemplate (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
if (method == null) {
|
||||
@ -125,9 +118,7 @@ function buildSearchTemplate (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'
|
||||
} else if ((index) != null) {
|
||||
if ((index) != null) {
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_search' + '/' + 'template'
|
||||
} else {
|
||||
path = '/' + '_search' + '/' + 'template'
|
||||
|
||||
Reference in New Issue
Block a user