[pve-devel] [PATCH pve-manager v2 4/4] api: add replication config read return schema
n.frey at proxmox.com
n.frey at proxmox.com
Wed Sep 24 13:59:04 CEST 2025
From: Nicolas Frey <n.frey at proxmox.com>
removed delete from schema for return types, as it is only used
in update/PUT.
Signed-off-by: Nicolas Frey <n.frey at proxmox.com>
---
PVE/API2/ReplicationConfig.pm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/PVE/API2/ReplicationConfig.pm b/PVE/API2/ReplicationConfig.pm
index 307ebe69..d6451d85 100644
--- a/PVE/API2/ReplicationConfig.pm
+++ b/PVE/API2/ReplicationConfig.pm
@@ -17,6 +17,10 @@ use PVE::API2::Replication;
use base qw(PVE::RESTHandler);
+my $replication_config_return_type = PVE::ReplicationConfig->createSchema();
+# delete only used in update endpoint
+delete $replication_config_return_type->{delete};
+
__PACKAGE__->register_method({
name => 'index',
path => '',
@@ -33,10 +37,7 @@ __PACKAGE__->register_method({
},
returns => {
type => 'array',
- items => {
- type => "object",
- properties => {},
- },
+ items => $replication_config_return_type,
links => [{ rel => 'child', href => "{id}" }],
},
code => sub {
@@ -75,7 +76,7 @@ __PACKAGE__->register_method({
id => get_standard_option('pve-replication-id'),
},
},
- returns => { type => 'object' },
+ returns => $replication_config_return_type,
code => sub {
my ($param) = @_;
--
2.47.3
More information about the pve-devel
mailing list