diff --git a/src/api_params.rs b/src/api_params.rs index d74377c..44997ca 100644 --- a/src/api_params.rs +++ b/src/api_params.rs @@ -97,40 +97,27 @@ pub enum InlineQueryResult { } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] -#[serde(tag = "type")] +#[serde(tag = "type", rename_all = "snake_case")] pub enum InputMedia { - #[serde(rename = "animation")] Animation(InputMediaAnimation), - #[serde(rename = "document")] Document(InputMediaDocument), - #[serde(rename = "audio")] Audio(InputMediaAudio), - #[serde(rename = "photo")] Photo(InputMediaPhoto), - #[serde(rename = "video")] Video(InputMediaVideo), } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] -#[serde(tag = "source")] +#[serde(tag = "source", rename_all = "snake_case")] pub enum PassportElementError { #[serde(rename = "data")] DataField(PassportElementErrorDataField), - #[serde(rename = "front_side")] FrontSide(PassportElementErrorFrontSide), - #[serde(rename = "reverse_side")] ReverseSide(PassportElementErrorReverseSide), - #[serde(rename = "selfie")] Selfie(PassportElementErrorSelfie), - #[serde(rename = "file")] File(PassportElementErrorFile), - #[serde(rename = "files")] Files(PassportElementErrorFiles), - #[serde(rename = "translation_file")] TranslationFile(PassportElementErrorTranslationFile), - #[serde(rename = "translation_files")] TranslationFiles(PassportElementErrorTranslationFiles), - #[serde(rename = "unspecified")] Unspecified(PassportElementErrorUnspecified), } diff --git a/src/objects.rs b/src/objects.rs index b5416f7..d902249 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -1339,7 +1339,6 @@ pub struct Story { pub struct StickerSet { pub name: String, pub title: String, - #[serde(rename = "sticker_type")] pub sticker_type: StickerType, #[doc(hidden)] #[deprecated(since = "0.19.2", note = "Please use `sticker_type` instead")]