Use serialize_all
@@ -26,17 +26,15 @@ struct QueryParameters {
/// Available sorting methods
#[derive(Deserialize, Clone, EnumString, Display)]
#[serde(rename_all = "lowercase")]
+#[strum(serialize_all = "snake_case")]
pub enum SortingMethod {
/// Sort by name
- #[strum(serialize = "name")]
Name,
/// Sort by size
- #[strum(serialize = "size")]
Size,
/// Sort by last modification date (natural sort: follows alphanumerical order)
- #[strum(serialize = "date")]
Date,
}
