* [PATCH pve-common] json schema: display nested oneOf error messages
@ 2026-06-05 15:42 Erik Fastermann
0 siblings, 0 replies; only message in thread
From: Erik Fastermann @ 2026-06-05 15:42 UTC (permalink / raw)
To: pve-devel; +Cc: Erik Fastermann
Correctly display the error message for each oneOf case, not just the
empty string, which was caused by the wrong key being used in the hash
lookup.
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-05 15:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-05 15:42 [PATCH pve-common] json schema: display nested oneOf error messages Erik Fastermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox