From d19af7a3ccd53459593246fbc2fffe0c33d86712 Mon Sep 17 00:00:00 2001 From: Sylvain Wallez Date: Tue, 25 Jan 2022 18:13:52 +0100 Subject: [PATCH] Make snapshot info in CreateSnapshotResponse optional --- output/schema/schema.json | 6 ++++-- output/typescript/types.ts | 2 +- .../snapshot/create/SnapshotCreateResponse.ts | 10 ++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index a82188fbde..527b79c9f9 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -159439,6 +159439,7 @@ "kind": "properties", "properties": [ { + "description": "Equals `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false`", "name": "accepted", "required": false, "since": "7.15.0", @@ -159451,8 +159452,9 @@ } }, { + "description": "Snapshot information. Present when the request had `wait_for_completion` set to `true`", "name": "snapshot", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -159469,7 +159471,7 @@ "namespace": "snapshot.create" }, "specLocation": { - "endLine": 28, + "endLine": 34, "path": "snapshot/create/SnapshotCreateResponse.ts", "startLine": 22 } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 6a74b20b14..e327377fe1 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -15419,7 +15419,7 @@ export interface SnapshotCreateRequest extends RequestBase { export interface SnapshotCreateResponse { accepted?: boolean - snapshot: SnapshotSnapshotInfo + snapshot?: SnapshotSnapshotInfo } export interface SnapshotCreateRepositoryRequest extends RequestBase { diff --git a/specification/snapshot/create/SnapshotCreateResponse.ts b/specification/snapshot/create/SnapshotCreateResponse.ts index eeffe0dbd3..ddc3395ed7 100644 --- a/specification/snapshot/create/SnapshotCreateResponse.ts +++ b/specification/snapshot/create/SnapshotCreateResponse.ts @@ -21,8 +21,14 @@ import { SnapshotInfo } from '@snapshot/_types/SnapshotInfo' export class Response { body: { - /** @since 7.15.0 */ + /** + * Equals `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false` + * @since 7.15.0 + */ accepted?: boolean - snapshot: SnapshotInfo + /** + * Snapshot information. Present when the request had `wait_for_completion` set to `true` + */ + snapshot?: SnapshotInfo } }