Skip to content

Commit ed90804

Browse files
authored
Fix validation errors for bulk API (#3273)
1 parent 2aa04ec commit ed90804

File tree

5 files changed

+41
-15
lines changed

5 files changed

+41
-15
lines changed

output/schema/schema.json

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@
5656
],
5757
"response": []
5858
},
59-
"bulk": {
60-
"request": [
61-
"Request: missing json spec query parameter 'type'",
62-
"Request: missing json spec query parameter 'require_data_stream'",
63-
"Request: missing json spec query parameter 'list_executed_pipelines'"
64-
],
65-
"response": []
66-
},
6759
"capabilities": {
6860
"request": [
6961
"Missing request & response"

output/typescript/types.ts

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/bulk/BulkRequest.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
4848
index?: IndexName
4949
}
5050
query_parameters: {
51+
/**
52+
* If `true`, the response will include the ingest pipelines that were executed for each index or create.
53+
* @server_default false
54+
*/
55+
list_executed_pipelines?: boolean
5156
/**
5257
* ID of the pipeline to use to preprocess incoming documents.
5358
* If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.
@@ -92,6 +97,11 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
9297
* @server_default false
9398
*/
9499
require_alias?: boolean
100+
/**
101+
* If `true`, the request's actions must target a data stream (existing or to-be-created).
102+
* @server_default false
103+
*/
104+
require_data_stream?: boolean
95105
}
96106
/**
97107
* The request body contains a newline-delimited list of `create`, `delete`, `index`, and `update` actions and their associated source data.

specification/_json_spec/bulk.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
"type": "time",
4747
"description": "Explicit operation timeout"
4848
},
49-
"type": {
50-
"type": "string",
51-
"description": "Default document type for items which don't provide one"
52-
},
5349
"_source": {
5450
"type": "list",
5551
"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"
@@ -68,11 +64,11 @@
6864
},
6965
"require_alias": {
7066
"type": "boolean",
71-
"description": "Sets require_alias for all incoming documents. Defaults to unset (false)"
67+
"description": "If true, the request’s actions must target an index alias. Defaults to false."
7268
},
7369
"require_data_stream": {
7470
"type": "boolean",
75-
"description": "When true, requires the destination to be a data stream (existing or to-be-created). Default is false"
71+
"description": "If true, the request's actions must target a data stream (existing or to-be-created). Default to false"
7672
},
7773
"list_executed_pipelines": {
7874
"type": "boolean",

0 commit comments

Comments
 (0)