api: add missing doc-comment description for api enums

this is used as description in the api schema

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 2d4209d9ef468a44e462905d609f07b7ca39ce84)
This commit is contained in:
Thomas Lamprecht 2024-10-22 15:26:35 +02:00 committed by Alexey Shabalin
parent abe16cd144
commit 0d912d6643
2 changed files with 5 additions and 1 deletions

View File

@ -200,6 +200,7 @@ pub fn read_user(userid: Userid, rpcenv: &mut dyn RpcEnvironment) -> Result<User
#[api()]
#[derive(Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
/// The set of properties that can be deleted from a user configuration.
pub enum DeletableProperty {
/// Delete the comment property.
Comment,

View File

@ -641,6 +641,7 @@ fn get_file_system_devices(lsblk_info: &[LsblkInfo]) -> Result<HashSet<u64>, Err
#[api()]
#[derive(Debug, Serialize, Deserialize, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
/// What a block device partition is used for.
pub enum PartitionUsageType {
/// Partition is not used (as far we can tell)
Unused,
@ -661,6 +662,7 @@ pub enum PartitionUsageType {
#[api()]
#[derive(Debug, Serialize, Deserialize, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
/// What a block device (disk) is used for.
pub enum DiskUsageType {
/// Disk is not used (as far we can tell)
Unused,
@ -1220,6 +1222,7 @@ pub fn create_single_linux_partition(disk: &Disk) -> Result<Disk, Error> {
#[api()]
#[derive(Debug, Copy, Clone, Serialize, Deserialize, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
/// A file system type supported by our tooling.
pub enum FileSystemType {
/// Linux Ext4
Ext4,
@ -1233,7 +1236,7 @@ impl std::fmt::Display for FileSystemType {
FileSystemType::Ext4 => "ext4",
FileSystemType::Xfs => "xfs",
};
write!(f, "{}", text)
write!(f, "{text}")
}
}