mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-16 20:33:20 +00:00
fix doc generator (do not convert efidisk0 to efidisk[N])
Also fix spacing in typetext generator.
This commit is contained in:
parent
1eac8b4b2c
commit
b54ad320a5
@ -1678,10 +1678,10 @@ sub schema_get_type_text {
|
||||
} elsif ($type eq 'integer' || $type eq 'number') {
|
||||
# NOTE: always access values as number (avoid converion to string)
|
||||
if (defined($phash->{minimum}) && defined($phash->{maximum})) {
|
||||
return "$type (" . ($phash->{minimum} + 0) . "-" .
|
||||
return "$type (" . ($phash->{minimum} + 0) . " - " .
|
||||
($phash->{maximum} + 0) . ")";
|
||||
} elsif (defined($phash->{minimum})) {
|
||||
return "$type (" . ($phash->{minimum} + 0) . "- N)";
|
||||
return "$type (" . ($phash->{minimum} + 0) . " - N)";
|
||||
} elsif (defined($phash->{maximum})) {
|
||||
return "$type (-N - " . ($phash->{maximum} + 0) . ")";
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ sub api_clone_schema {
|
||||
my $pd = $d->{$p};
|
||||
if ($p =~ m/^([a-z]+)(\d+)$/) {
|
||||
my ($name, $idx) = ($1, $2);
|
||||
if ($idx == 0) {
|
||||
if ($idx == 0 && defined($d->{"${name}1"})) {
|
||||
$p = "${name}[n]";
|
||||
} elsif (defined($d->{"${name}0"})) {
|
||||
next; # only handle once for -xx0, but only if -xx0 exists
|
||||
@ -591,7 +591,7 @@ sub usage_str {
|
||||
if ($k =~ m/^([a-z]+)(\d+)$/) {
|
||||
my ($name, $idx) = ($1, $2);
|
||||
next if $idx_param->{$name};
|
||||
if ($idx == 0) {
|
||||
if ($idx == 0 && defined($prop->{"${name}1"})) {
|
||||
$idx_param->{$name} = 1;
|
||||
$base = "${name}[n]";
|
||||
}
|
||||
@ -656,7 +656,7 @@ sub dump_properties {
|
||||
if ($k =~ m/^([a-z]+)(\d+)$/) {
|
||||
my ($name, $idx) = ($1, $2);
|
||||
next if $idx_param->{$name};
|
||||
if ($idx == 0) {
|
||||
if ($idx == 0 && defined($prop->{"${name}1"})) {
|
||||
$idx_param->{$name} = 1;
|
||||
$base = "${name}[n]";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user