Correctly display the error message for each oneOf case, not just the empty string.
Signed-off-by: Erik Fastermann <[email protected]> --- 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
