From: Fiona Ebner <f.ebner@proxmox.com>
To: Erik Fastermann <e.fastermann@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH pve-common 1/3] json schema: display nested oneOf error messages
Date: Fri, 29 May 2026 17:25:59 +0200 [thread overview]
Message-ID: <29ad828f-4216-44b2-8c2b-04cc94adb9db@proxmox.com> (raw)
In-Reply-To: <20260529125808.204983-2-e.fastermann@proxmox.com>
Nit: the title could mention that it fixes an existing issue, e.g.
"fix displaying ..."
Am 29.05.26 um 2:58 PM schrieb Erik Fastermann:
> Correctly display the error message for each oneOf case, not just the
> empty string.
Nit: you could elaborate slightly more, saying that it ended up being
the empty string, because the wrong key was used when doing the hash lookup.
For completeness, it could have a
Fixes: 9425834 ("json schema: implement 'oneOf' schema")
tag.
>
> Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
> ---
> src/PVE/JSONSchema.pm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm
> index 1997c70..fd10338 100644
> --- a/src/PVE/JSONSchema.pm
> +++ b/src/PVE/JSONSchema.pm
> @@ -1409,13 +1409,13 @@ sub check_prop {
> }
>
> for my $inner_path (keys $inner_errors->%*) {
pre-existing, but we could add a sort here for consistency (in its own
patch)
> - add_error($collected_errors, $inner_path, $inner_errors->{$path});
> + add_error($collected_errors, $inner_path, $inner_errors->{$inner_path});
> }
> }
>
> if (!$is_valid) {
> for my $inner_path (keys $collected_errors->%*) {
same here (in the same separate patch)
> - add_error($errors, $inner_path, $collected_errors->{$path});
> + add_error($errors, $inner_path, $collected_errors->{$inner_path});
> }
> }
> }
next prev parent reply other threads:[~2026-05-29 15:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 12:58 [RFC common/manager/qemu-server 0/3] fix #1989: qemu: add qcow2 cache options Erik Fastermann
2026-05-29 12:58 ` [PATCH pve-common 1/3] json schema: display nested oneOf error messages Erik Fastermann
2026-05-29 15:25 ` Fiona Ebner [this message]
2026-05-29 12:58 ` [PATCH qemu-server 2/3] fix #1989: disk: add qcow2 cache options Erik Fastermann
2026-05-29 15:26 ` Fiona Ebner
2026-05-29 12:58 ` [PATCH pve-manager 3/3] fix #1989: qemu: disk: add cache size config Erik Fastermann
2026-05-29 15:26 ` [RFC common/manager/qemu-server 0/3] fix #1989: qemu: add qcow2 cache options Fiona Ebner
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=29ad828f-4216-44b2-8c2b-04cc94adb9db@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=e.fastermann@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.