diff --git a/proxmox-tui-installer/src/setup.rs b/proxmox-tui-installer/src/setup.rs index 2a66f41..5731c4d 100644 --- a/proxmox-tui-installer/src/setup.rs +++ b/proxmox-tui-installer/src/setup.rs @@ -110,15 +110,24 @@ pub struct InstallConfig { #[serde(serialize_with = "serialize_fstype")] filesys: FsType, hdsize: u64, + #[serde(skip_serializing_if = "Option::is_none")] swapsize: Option, + #[serde(skip_serializing_if = "Option::is_none")] maxroot: Option, + #[serde(skip_serializing_if = "Option::is_none")] minfree: Option, + #[serde(skip_serializing_if = "Option::is_none")] maxvz: Option, + #[serde(skip_serializing_if = "Option::is_none")] zfs_opts: Option, - #[serde(serialize_with = "serialize_disk_opt")] + #[serde( + serialize_with = "serialize_disk_opt", + skip_serializing_if = "Option::is_none" + )] target_hd: Option, + #[serde(skip_serializing_if = "HashMap::is_empty")] disk_selection: HashMap, country: String,