From 027033c17a8ae483011e2a7c5859a7a9d9196566 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 20 Apr 2022 09:40:05 +0200 Subject: [PATCH] RemoteWithoutPassword: new API type To make it explicit that we do not return the password. Signed-off-by: Dietmar Maurer --- pbs-api-types/src/remote.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pbs-api-types/src/remote.rs b/pbs-api-types/src/remote.rs index 1ebc9d4c..890e31c0 100644 --- a/pbs-api-types/src/remote.rs +++ b/pbs-api-types/src/remote.rs @@ -85,3 +85,22 @@ pub struct Remote { #[serde(flatten)] pub config: RemoteConfig, } + +#[api( + properties: { + name: { + schema: REMOTE_ID_SCHEMA, + }, + config: { + type: RemoteConfig, + }, + }, +)] +#[derive(Serialize, Deserialize)] +#[serde(rename_all = "kebab-case")] +/// Remote properties. +pub struct RemoteWithoutPassword { + pub name: String, + #[serde(flatten)] + pub config: RemoteConfig, +}