From: Stefan Sterz <s.sterz@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/2] fix: api2: add return type to nodes/{node}/execute endpoint
Date: Wed, 27 Jul 2022 16:56:11 +0200 [thread overview]
Message-ID: <20220727145612.451691-1-s.sterz@proxmox.com> (raw)
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@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
next reply other threads:[~2022-07-27 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 14:56 Stefan Sterz [this message]
2022-07-27 14:56 ` [pve-devel] [PATCH manager 2/2] api2: use JSONSchema to validate commands for "nodes/{node}/execute" Stefan Sterz
2022-08-02 12:47 ` [pve-devel] applied+follow-up: " Fabian Grünbichler
2022-08-02 12:45 ` [pve-devel] applied: [PATCH manager 1/2] fix: api2: add return type to nodes/{node}/execute endpoint Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220727145612.451691-1-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.