diff --git a/pbs-api-types/Cargo.toml b/pbs-api-types/Cargo.toml index 9b1461a9..b40a707c 100644 --- a/pbs-api-types/Cargo.toml +++ b/pbs-api-types/Cargo.toml @@ -14,7 +14,7 @@ regex = "1.2" serde = { version = "1.0", features = ["derive"] } proxmox-lang = "1.0.0" -proxmox-schema = { version = "1.0.1", features = [ "api-macro" ] } +proxmox-schema = { version = "1.1", features = [ "api-macro" ] } proxmox-serde = "0.1" proxmox-time = "1.1.1" proxmox-uuid = { version = "1.0.0", features = [ "serde" ] } diff --git a/src/api2/types/mod.rs b/src/api2/types/mod.rs index 28bea293..1911557f 100644 --- a/src/api2/types/mod.rs +++ b/src/api2/types/mod.rs @@ -39,7 +39,7 @@ fn test_cert_fingerprint_schema() -> Result<(), anyhow::Error> { ]; for fingerprint in invalid_fingerprints.iter() { - if parse_simple_value(fingerprint, &schema).is_ok() { + if schema.parse_simple_value(fingerprint).is_ok() { bail!("test fingerprint '{}' failed - got Ok() while exception an error.", fingerprint); } } @@ -50,7 +50,7 @@ fn test_cert_fingerprint_schema() -> Result<(), anyhow::Error> { ]; for fingerprint in valid_fingerprints.iter() { - let v = match parse_simple_value(fingerprint, &schema) { + let v = match schema.parse_simple_value(fingerprint) { Ok(v) => v, Err(err) => { bail!("unable to parse fingerprint '{}' - {}", fingerprint, err); @@ -83,7 +83,7 @@ fn test_proxmox_user_id_schema() -> Result<(), anyhow::Error> { ]; for name in invalid_user_ids.iter() { - if parse_simple_value(name, &Userid::API_SCHEMA).is_ok() { + if Userid::API_SCHEMA.parse_simple_value(name).is_ok() { bail!("test userid '{}' failed - got Ok() while exception an error.", name); } } @@ -97,7 +97,7 @@ fn test_proxmox_user_id_schema() -> Result<(), anyhow::Error> { ]; for name in valid_user_ids.iter() { - let v = match parse_simple_value(name, &Userid::API_SCHEMA) { + let v = match Userid::API_SCHEMA.parse_simple_value(name) { Ok(v) => v, Err(err) => { bail!("unable to parse userid '{}' - {}", name, err);