Skip to content

Commit

Permalink
[Backport 8.17] Fix validation errors for bulk API (#3287)
Browse files Browse the repository at this point in the history
(cherry picked from commit ed90804)

Co-authored-by: Quentin Pradet <[email protected]>
  • Loading branch information
github-actions[bot] and pquentin authored Dec 12, 2024
1 parent f663ed0 commit eb6adaf
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 15 deletions.
28 changes: 27 additions & 1 deletion output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions output/schema/validation-errors.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions specification/_global/bulk/BulkRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
index?: IndexName
}
query_parameters: {
/**
* If `true`, the response will include the ingest pipelines that were executed for each index or create.
* @server_default false
*/
list_executed_pipelines?: boolean
/**
* ID of the pipeline to use to preprocess incoming documents.
* If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.
Expand Down Expand Up @@ -92,6 +97,11 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
* @server_default false
*/
require_alias?: boolean
/**
* If `true`, the request's actions must target a data stream (existing or to-be-created).
* @server_default false
*/
require_data_stream?: boolean
}
/**
* The request body contains a newline-delimited list of `create`, `delete`, `index`, and `update` actions and their associated source data.
Expand Down
8 changes: 2 additions & 6 deletions specification/_json_spec/bulk.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
"type": "time",
"description": "Explicit operation timeout"
},
"type": {
"type": "string",
"description": "Default document type for items which don't provide one"
},
"_source": {
"type": "list",
"description": "True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"
Expand All @@ -68,11 +64,11 @@
},
"require_alias": {
"type": "boolean",
"description": "Sets require_alias for all incoming documents. Defaults to unset (false)"
"description": "If true, the request’s actions must target an index alias. Defaults to false."
},
"require_data_stream": {
"type": "boolean",
"description": "When true, requires the destination to be a data stream (existing or to-be-created). Default is false"
"description": "If true, the request's actions must target a data stream (existing or to-be-created). Default to false"
},
"list_executed_pipelines": {
"type": "boolean",
Expand Down

0 comments on commit eb6adaf

Please sign in to comment.