api2/types: add type_text to DATASTORE_MAP_FORMAT

This way we get a better rendering in the api-viewer.
before:
 [<string>, ... ]

after:
 [(<source>=)?<target>, ... ]

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-03-25 13:11:23 +01:00 committed by Dietmar Maurer
parent c553407e98
commit 93fb2e0d21

View File

@ -365,6 +365,7 @@ pub const DATASTORE_MAP_SCHEMA: Schema = StringSchema::new("Datastore mapping.")
.format(&DATASTORE_MAP_FORMAT) .format(&DATASTORE_MAP_FORMAT)
.min_length(3) .min_length(3)
.max_length(65) .max_length(65)
.type_text("(<source>=)?<target>")
.schema(); .schema();
pub const DATASTORE_MAP_ARRAY_SCHEMA: Schema = ArraySchema::new( pub const DATASTORE_MAP_ARRAY_SCHEMA: Schema = ArraySchema::new(