[pve-devel] [PATCH pve-manager 5/5] api: add replication config read return schema
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Sep 22 19:18:57 CEST 2025
Am 19.09.25 um 11:40 schrieb n.frey at proxmox.com:
> From: Nicolas Frey <n.frey at proxmox.com>
Ah, you actually figured about re-using the SectionConfig schema
here, but some commit message would be really warranted here to
explain why it's fine to use the *create* schema as *return*
schema. Don't get me wrong, that might be fine (I expect it too
from a gut feeling, but did not actually checked and reasoned),
but such things really need a basic rationale to describe why
it actually is. And if it is then you can naturally switch the
ACME return endpoint also to such a style.
> Signed-off-by: Nicolas Frey <n.frey at proxmox.com>
> ---
> PVE/API2/ReplicationConfig.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/API2/ReplicationConfig.pm b/PVE/API2/ReplicationConfig.pm
> index 307ebe69..515afcec 100644
> --- a/PVE/API2/ReplicationConfig.pm
> +++ b/PVE/API2/ReplicationConfig.pm
> @@ -75,7 +75,7 @@ __PACKAGE__->register_method({
> id => get_standard_option('pve-replication-id'),
> },
> },
> - returns => { type => 'object' },
> + returns => PVE::ReplicationConfig->createSchema(),
> code => sub {
> my ($param) = @_;
>
More information about the pve-devel
mailing list