mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
Use chrono::Duration directly with serde attributes
This commit is contained in:
@@ -19,6 +19,8 @@ ${struct} {
|
||||
% endif
|
||||
% if p.get("format", None) == "byte":
|
||||
#[serde(serialize_with = "client::types::to_urlsafe_base64", deserialize_with = "client::types::from_urlsafe_base64")]
|
||||
% elif p.get("format", None) == "google-duration":
|
||||
#[serde(serialize_with = "client::types::to_duration_str", deserialize_with = "client::types::from_duration_str")]
|
||||
% endif
|
||||
pub ${mangle_ident(pn)}: ${to_rust_type(schemas, s.id, pn, p, allow_optionals=allow_optionals)},
|
||||
% endfor
|
||||
|
||||
Reference in New Issue
Block a user