From 71da3d6a1b24cbcd7eb089aa657f85820610b4c4 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 9 Jan 2020 10:36:19 +0100 Subject: [PATCH] src/api2/types.rs: fix SnapshotListItem schema definition --- src/api2/types.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/api2/types.rs b/src/api2/types.rs index 9332b5de..ae4cadb4 100644 --- a/src/api2/types.rs +++ b/src/api2/types.rs @@ -121,7 +121,6 @@ pub const DATASTORE_SCHEMA: Schema = StringSchema::new("Datastore name.") // Complex type definitions #[api( - description: "Basic information about backup snapshot.", properties: { "backup-type": { schema: BACKUP_TYPE_SCHEMA, @@ -132,15 +131,23 @@ pub const DATASTORE_SCHEMA: Schema = StringSchema::new("Datastore name.") "backup-time": { schema: BACKUP_TIME_SCHEMA, }, + files: { + items: { + schema: BACKUP_ARCHIVE_NAME_SCHEMA + }, + }, }, )] #[derive(Serialize, Deserialize)] #[serde(rename_all="kebab-case")] +/// Basic information about backup snapshot. pub struct SnapshotListItem { pub backup_type: String, // enum pub backup_id: String, pub backup_time: i64, + /// List of contained archive files. pub files: Vec, + /// Overall snapshot size (sum of all archive sizes). #[serde(skip_serializing_if="Option::is_none")] pub size: Option, }