API generation

This commit is contained in:
delvedor
2020-03-19 08:39:55 +01:00
parent b374fe9967
commit 7f19628907
4 changed files with 3 additions and 16 deletions

View File

@ -14,9 +14,7 @@ function buildIndicesPutTemplate (opts) {
const acceptedQuerystring = [
'order',
'create',
'timeout',
'master_timeout',
'flat_settings',
'pretty',
'human',
'error_trace',
@ -26,7 +24,6 @@ function buildIndicesPutTemplate (opts) {
const snakeCase = {
masterTimeout: 'master_timeout',
flatSettings: 'flat_settings',
errorTrace: 'error_trace',
filterPath: 'filter_path'
}

View File

@ -30,7 +30,7 @@ function buildTransformCatTransform (opts) {
/**
* Perform a transform.cat_transform request
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-transforms.html
* https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html
*/
return function transformCatTransform (params, options, callback) {
options = options || {}
@ -63,10 +63,10 @@ function buildTransformCatTransform (opts) {
if ((transform_id || transformId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'transform' + '/' + encodeURIComponent(transform_id || transformId)
path = '/' + '_cat' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'transform'
path = '/' + '_cat' + '/' + 'transforms'
}
// build request object

View File

@ -794,9 +794,7 @@ export interface IndicesPutTemplate<T = any> extends Generic {
name: string;
order?: number;
create?: boolean;
timeout?: string;
master_timeout?: string;
flat_settings?: boolean;
body: T;
}