api: try to add more return schema information
no problem for 'select_existing', but we cannot actually describe 'format' with our JSONSchema, since it uses an array as a form of tuple, and even with oneOf this cannot be described currently. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
8eabcc7011
commit
ede776abef
@ -171,6 +171,23 @@ __PACKAGE__->register_method({
|
|||||||
renderer => 'fraction_as_percentage',
|
renderer => 'fraction_as_percentage',
|
||||||
optional => 1,
|
optional => 1,
|
||||||
},
|
},
|
||||||
|
select_existing => {
|
||||||
|
description => "Instead of creating new volumes, one must select one that"
|
||||||
|
. " is already existing. Only included if 'format' parameter is set.",
|
||||||
|
type => 'boolean',
|
||||||
|
optional => 1,
|
||||||
|
},
|
||||||
|
|
||||||
|
# we can't include this return schema, since we cannot properly
|
||||||
|
# describe what it actually is with the json schema:
|
||||||
|
#
|
||||||
|
# a tuple in form of an array where the first element is an
|
||||||
|
# object, and the second is a string.
|
||||||
|
#format => {
|
||||||
|
# description => "Lists the supported and default format."
|
||||||
|
# . " Only included if 'format' parameter is set.",
|
||||||
|
# optional => 1,
|
||||||
|
#},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
links => [{ rel => 'child', href => "{storage}" }],
|
links => [{ rel => 'child', href => "{storage}" }],
|
||||||
|
|||||||
Reference in New Issue
Block a user