Update code generation (#969)

* Updated code generation scripts to use the new spec

* API generation

* Fix bad link
This commit is contained in:
Tomas Della Vedova
2019-09-16 16:55:23 +02:00
committed by GitHub
parent 4ff1bd5110
commit 69247496ce
285 changed files with 2552 additions and 4581 deletions

View File

@ -10,12 +10,6 @@
function buildSecurityPutPrivileges (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
/**
* Perform a [security.put_privileges](TODO) request
*
* @param {enum} refresh - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
* @param {object} body - The privilege(s) to add
*/
const acceptedQuerystring = [
'refresh'
@ -25,6 +19,10 @@ function buildSecurityPutPrivileges (opts) {
}
/**
* Perform a security.put_privileges request
* TODO
*/
return function securityPutPrivileges (params, options, callback) {
options = options || {}
if (typeof options === 'function') {
@ -53,10 +51,6 @@ function buildSecurityPutPrivileges (opts) {
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
if (method == null) {
method = 'PUT'
}
var ignore = options.ignore
if (typeof ignore === 'number') {
options.ignore = [ignore]
@ -64,6 +58,7 @@ function buildSecurityPutPrivileges (opts) {
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'privilege'
// build request object