From f3ec5dae7fd96442166cf79c33e972b90d699663 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 14 Jan 2020 14:55:58 +0100 Subject: [PATCH] src/api2/config: improve api schema by adding return type --- src/api2/config/datastore.rs | 6 +++++- src/api2/config/remotes.rs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs index 2408a2b5..2ddf77ea 100644 --- a/src/api2/config/datastore.rs +++ b/src/api2/config/datastore.rs @@ -14,7 +14,7 @@ use crate::config::datastore; properties: {}, }, returns: { - description: "List the configured datastores.", + description: "List the configured datastores (with config digest).", type: Array, items: { type: datastore::DataStoreConfig, @@ -83,6 +83,10 @@ pub fn create_datastore(name: String, param: Value) -> Result<(), Error> { }, }, }, + returns: { + description: "The datastore configuration (with config digest).", + type: datastore::DataStoreConfig, + }, )] /// Read a datastore configuration. pub fn read_datastore(name: String) -> Result { diff --git a/src/api2/config/remotes.rs b/src/api2/config/remotes.rs index 8ef6460e..15a817c6 100644 --- a/src/api2/config/remotes.rs +++ b/src/api2/config/remotes.rs @@ -11,7 +11,7 @@ use crate::config::remotes; properties: {}, }, returns: { - description: "The list of configured remotes.", + description: "The list of configured remotes (with config digest).", type: Array, items: { type: remotes::Remote, @@ -81,6 +81,10 @@ pub fn create_remote(name: String, param: Value) -> Result<(), Error> { }, }, }, + returns: { + description: "The remote configuration (with config digest).", + type: remotes::Remote, + }, )] /// Read remote configuration data. pub fn read_remote(name: String) -> Result {