[pve-devel] [PATCH manager 1/2] fix: api2: add return type to nodes/{node}/execute endpoint

Stefan Sterz s.sterz at proxmox.com
Wed Jul 27 16:56:11 CEST 2022


since this was missing a proper return type definition the api viewer
couldn't display the endpoint (`retinfs.items` was undefined). also
the `pvesh` command would complain that it cannot properly format the
return type because the variable `$item_type` in `CLIFormatter.pm` was
not defined.

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
 PVE/API2/Nodes.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 655493a3..ef946301 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -438,8 +438,9 @@ __PACKAGE__->register_method({
     },
     returns => {
 	type => 'array',
-	properties => {
-
+	items => {
+	    type => "object",
+	    properties => {},
 	},
     },
     code => sub {
-- 
2.30.2






More information about the pve-devel mailing list