[pbs-devel] [PATCH proxmox-backup] api2/types: add type_text to DATASTORE_MAP_FORMAT
    Dominik Csapak 
    d.csapak at proxmox.com
       
    Thu Mar 25 13:11:23 CET 2021
    
    
  
This way we get a better rendering in the api-viewer.
before:
 [<string>, ... ]
after:
 [(<source>=)?<target>, ... ]
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/api2/types/mod.rs | 1 +
 1 file changed, 1 insertion(+)
diff --git a/src/api2/types/mod.rs b/src/api2/types/mod.rs
index 80db98fc..1bd4f92a 100644
--- a/src/api2/types/mod.rs
+++ b/src/api2/types/mod.rs
@@ -365,6 +365,7 @@ pub const DATASTORE_MAP_SCHEMA: Schema = StringSchema::new("Datastore mapping.")
     .format(&DATASTORE_MAP_FORMAT)
     .min_length(3)
     .max_length(65)
+    .type_text("(<source>=)?<target>")
     .schema();
 
 pub const DATASTORE_MAP_ARRAY_SCHEMA: Schema = ArraySchema::new(
-- 
2.20.1
    
    
More information about the pbs-devel
mailing list