Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation errors for bulk API #3273

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading