From ceff805433273e3c9944c81e7b7d86d5e4301687 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 11 Jul 2025 17:15:45 +0400 Subject: [PATCH] Add wait_for_completion to snapshot.delete (#4875) (cherry picked from commit 05432996eea446c0053717fbaa1c126e1ce8e7d4) # Conflicts: # output/schema/schema.json --- output/openapi/elasticsearch-openapi.json | 10 ++++++++++ output/schema/schema.json | 15 ++++++++++++++- output/schema/validation-errors.json | 6 ------ output/typescript/types.ts | 1 + .../snapshot/delete/SnapshotDeleteRequest.ts | 6 ++++++ 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index dd0988dac0..b9038152f7 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -38792,6 +38792,16 @@ "$ref": "#/components/schemas/_types.Duration" }, "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request returns a response when the matching snapshots are all deleted.\nIf `false`, the request returns a response as soon as the deletes are scheduled.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { diff --git a/output/schema/schema.json b/output/schema/schema.json index b72884ce19..b8f1a2c8cd 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -244365,9 +244365,22 @@ "namespace": "_types" } } + }, + { + "description": "If `true`, the request returns a response when the matching snapshots are all deleted.\nIf `false`, the request returns a response as soon as the deletes are scheduled.", + "name": "wait_for_completion", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "snapshot/delete/SnapshotDeleteRequest.ts#L24-L46" + "specLocation": "snapshot/delete/SnapshotDeleteRequest.ts#L24-L52" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 097e04c9ec..2cfbf31538 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -305,12 +305,6 @@ ], "response": [] }, - "snapshot.delete": { - "request": [ - "Request: missing json spec query parameter 'wait_for_completion'" - ], - "response": [] - }, "snapshot.repository_analyze": { "request": [ "Request: query parameter 'register_operation_count' does not exist in the json spec" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 58e9a7ade8..e06776e4d4 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -20975,6 +20975,7 @@ export interface SnapshotDeleteRequest extends RequestBase { repository: Name snapshot: Name master_timeout?: Duration + wait_for_completion?: boolean } export type SnapshotDeleteResponse = AcknowledgedResponseBase diff --git a/specification/snapshot/delete/SnapshotDeleteRequest.ts b/specification/snapshot/delete/SnapshotDeleteRequest.ts index a05be88cb2..a9b393efef 100644 --- a/specification/snapshot/delete/SnapshotDeleteRequest.ts +++ b/specification/snapshot/delete/SnapshotDeleteRequest.ts @@ -42,5 +42,11 @@ export interface Request extends RequestBase { } query_parameters: { master_timeout?: Duration + /** + * If `true`, the request returns a response when the matching snapshots are all deleted. + * If `false`, the request returns a response as soon as the deletes are scheduled. + * @server_default true + */ + wait_for_completion?: boolean } }