API generation
This commit is contained in:
@ -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'
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
2
api/requestParams.d.ts
vendored
2
api/requestParams.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user