mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-03-10 12:58:25 +03:00
limit serial and model and document their real limits
The urlencoded format currently cannot check the real decoded length, so we limit to an upper bound and document the real limits. Ideally we'd introduce a decodedLength schema parameter at some point...
This commit is contained in:
parent
5572d53e87
commit
ba8fc5d13e
@ -620,7 +620,8 @@ my %drivedesc_base = (
|
||||
type => 'string',
|
||||
format => 'urlencoded',
|
||||
format_description => 'serial',
|
||||
description => "The drive's reported serial number, url-encoded.",
|
||||
maxLength => 20*3, # *3 since it's %xx url enoded
|
||||
description => "The drive's reported serial number, url-encoded, up to 20 bytes long.",
|
||||
optional => 1,
|
||||
}
|
||||
);
|
||||
@ -647,7 +648,8 @@ my %model_fmt = (
|
||||
type => 'string',
|
||||
format => 'urlencoded',
|
||||
format_description => 'model',
|
||||
description => "The drive's reported model name, url-encoded.",
|
||||
maxLength => 40*3, # *3 since it's %xx url enoded
|
||||
description => "The drive's reported model name, url-encoded, up to 40 bytes long.",
|
||||
optional => 1,
|
||||
},
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user