From 9db95724accd9739f09c165fc1e119261d0fe064 Mon Sep 17 00:00:00 2001 From: Laura Trotta <153528055+l-trotta@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:45:00 +0200 Subject: [PATCH] tentative fix (#2999) --- output/openapi/elasticsearch-openapi.json | 8 ++++---- output/schema/schema.json | 17 ++++++++++++++--- output/typescript/types.ts | 3 ++- .../snapshot/restore/SnapshotRestoreResponse.ts | 5 ++++- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 96bdb9f7af..3cb3614300 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -31461,13 +31461,13 @@ "schema": { "type": "object", "properties": { + "accepted": { + "type": "boolean" + }, "snapshot": { "$ref": "#/components/schemas/snapshot.restore:SnapshotRestore" } - }, - "required": [ - "snapshot" - ] + } } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index 8397d31c40..9371b501cd 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -201096,9 +201096,20 @@ "body": { "kind": "properties", "properties": [ + { + "name": "accepted", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "name": "snapshot", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -201113,7 +201124,7 @@ "name": "Response", "namespace": "snapshot.restore" }, - "specLocation": "snapshot/restore/SnapshotRestoreResponse.ts#L23-L25" + "specLocation": "snapshot/restore/SnapshotRestoreResponse.ts#L23-L28" }, { "kind": "interface", @@ -201159,7 +201170,7 @@ } } ], - "specLocation": "snapshot/restore/SnapshotRestoreResponse.ts#L27-L31" + "specLocation": "snapshot/restore/SnapshotRestoreResponse.ts#L30-L34" }, { "kind": "request", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 7d8c4a9bcb..177cccae6e 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -19105,7 +19105,8 @@ export interface SnapshotRestoreRequest extends RequestBase { } export interface SnapshotRestoreResponse { - snapshot: SnapshotRestoreSnapshotRestore + accepted?: boolean + snapshot?: SnapshotRestoreSnapshotRestore } export interface SnapshotRestoreSnapshotRestore { diff --git a/specification/snapshot/restore/SnapshotRestoreResponse.ts b/specification/snapshot/restore/SnapshotRestoreResponse.ts index 428036df10..bf88f771c2 100644 --- a/specification/snapshot/restore/SnapshotRestoreResponse.ts +++ b/specification/snapshot/restore/SnapshotRestoreResponse.ts @@ -21,7 +21,10 @@ import { IndexName } from '@_types/common' import { ShardStatistics } from '@_types/Stats' export class Response { - body: { snapshot: SnapshotRestore } + body: { + accepted?: boolean + snapshot?: SnapshotRestore + } } export class SnapshotRestore {