fix: batch size validation

This commit is contained in:
rustmailer
2026-01-28 20:39:47 +08:00
parent a0d8d069c0
commit d63b1e0d7c
20 changed files with 78 additions and 24 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ pub struct AccountCreateRequest {
pub folder_limit: Option<u32>,
#[oai(validator(minimum(value = "10")))]
pub sync_interval_min: Option<i64>,
#[oai(validator(minimum(value = "30"), maximum(value = "200")))]
#[oai(validator(minimum(value = "10"), maximum(value = "200")))]
pub sync_batch_size: Option<u32>,
pub use_proxy: Option<u64>,
pub use_dangerous: bool,
@@ -145,7 +145,7 @@ pub struct AccountUpdateRequest {
/// Incremental sync interval (seconds)
#[oai(validator(minimum(value = "10")))]
pub sync_interval_min: Option<i64>,
#[oai(validator(minimum(value = "30"), maximum(value = "200")))]
#[oai(validator(minimum(value = "10"), maximum(value = "200")))]
pub sync_batch_size: Option<u32>,
/// Optional proxy ID for establishing the connection to external APIs (e.g., Gmail, Outlook).
/// - If `None` or not provided, the client will connect directly to the API server.