e.g. pvenode acme account info [<name>]
Signed-off-by: Dominik Csapak <[email protected]>
---
src/PVE/JSONSchema.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm
index c9a9b1e..45ebf99 100644
--- a/src/PVE/JSONSchema.pm
+++ b/src/PVE/JSONSchema.pm
@@ -1441,7 +1441,9 @@ sub get_options {
if ($arg_name eq 'extra-args') {
$opts->{'extra-args'} = [];
} else {
- raise("not enough arguments\n", code => HTTP_BAD_REQUEST);
+ my $pd = $schema->{properties}->{$arg_name};
+ raise("not enough arguments\n", code => HTTP_BAD_REQUEST)
+ if !$pd->{optional};
}
}
}
--
2.11.0
_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel