Skip to content

Commit

Permalink
Fix validation errors for bulk API
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Dec 11, 2024
1 parent 2045505 commit a255a61
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@
],
"response": []
},
"bulk": {
"request": [
"Request: missing json spec query parameter 'type'",
"Request: missing json spec query parameter 'require_data_stream'",
"Request: missing json spec query parameter 'list_executed_pipelines'"
],
"response": []
},
"capabilities": {
"request": [
"Missing request & response"
Expand Down
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 a255a61

Please sign in to comment.