API generation

This commit is contained in:
delvedor
2021-02-19 08:32:33 +01:00
parent d506222d02
commit 7b21f92ceb
70 changed files with 1036 additions and 1036 deletions

View File

@ -30,21 +30,21 @@ function searchTemplateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params['body'] == null) {
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params['type'] != null && (params['index'] == null)) {
if (params.type != null && (params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
var { method, body, index, type, ...querystring } = params
let { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
var path = ''
let path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'