From 2ce09077b1d1860058d939e43dfe8a593eb96ba5 Mon Sep 17 00:00:00 2001 From: Ritesh Chitlangi Date: Fri, 19 Nov 2021 13:28:51 +0800 Subject: [PATCH] added missing serde aliases for de-ser from valid but non-prefixed xml --- epp-client/src/epp/request/contact/create.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/epp-client/src/epp/request/contact/create.rs b/epp-client/src/epp/request/contact/create.rs index cef687a..65d1f25 100644 --- a/epp-client/src/epp/request/contact/create.rs +++ b/epp-client/src/epp/request/contact/create.rs @@ -78,25 +78,25 @@ pub type EppContactCreate = EppObject>; #[derive(Serialize, Deserialize, Debug)] pub struct Contact { /// XML namespace for contact commands - #[serde(rename = "xmlns:contact")] + #[serde(rename = "xmlns:contact", alias = "xmlns")] xmlns: String, /// Contact <id> tag - #[serde(rename = "contact:id")] + #[serde(rename = "contact:id", alias = "id")] id: StringValue, /// Contact <postalInfo> tag - #[serde(rename = "contact:postalInfo")] + #[serde(rename = "contact:postalInfo", alias = "postalInfo")] postal_info: data::PostalInfo, /// Contact <voice> tag - #[serde(rename = "contact:voice")] + #[serde(rename = "contact:voice", alias = "voice")] voice: data::Phone, /// Contact <fax> tag, - #[serde(rename = "contact:fax")] + #[serde(rename = "contact:fax", alias = "fax")] fax: Option, /// Contact <email> tag - #[serde(rename = "contact:email")] + #[serde(rename = "contact:email", alias = "email")] email: StringValue, /// Contact <authInfo> tag - #[serde(rename = "contact:authInfo")] + #[serde(rename = "contact:authInfo", alias = "authInfo")] auth_info: data::ContactAuthInfo, } @@ -105,7 +105,7 @@ pub struct Contact { /// Type for EPP XML <create> command for contacts pub struct ContactCreate { /// Data for <create> command for contact - #[serde(rename = "contact:create")] + #[serde(rename = "contact:create", alias = "create")] pub contact: Contact, }