all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Erik Fastermann <e.fastermann@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Erik Fastermann <e.fastermann@proxmox.com>
Subject: [PATCH pve-common 1/3] json schema: display nested oneOf error messages
Date: Fri, 29 May 2026 14:58:06 +0200	[thread overview]
Message-ID: <20260529125808.204983-2-e.fastermann@proxmox.com> (raw)
In-Reply-To: <20260529125808.204983-1-e.fastermann@proxmox.com>

Correctly display the error message for each oneOf case, not just the
empty string.

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->%*) {
-                    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->%*) {
-                    add_error($errors, $inner_path, $collected_errors->{$path});
+                    add_error($errors, $inner_path, $collected_errors->{$inner_path});
                 }
             }
         }
-- 
2.47.3




  reply	other threads:[~2026-05-29 12:59 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 ` Erik Fastermann [this message]
2026-05-29 15:25   ` [PATCH pve-common 1/3] json schema: display nested oneOf error messages Fiona Ebner
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=20260529125808.204983-2-e.fastermann@proxmox.com \
    --to=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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal