Am 24.09.25 um 13:59 schrieb [email protected]:
> From: Nicolas Frey <[email protected]>
>
> removed delete from schema for return types, as it is only used
> in update/PUT.
>
> Signed-off-by: Nicolas Frey <[email protected]>
> ---
> 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};
> +
Which makes one rather wonder why it gets returned for the create schema in
the first place – after all we do have a updateSchema
> __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) = @_;
>
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel