Skip to content

Commit

Permalink
Use str_like to (de)serialize 64bit numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
philippeitis authored Oct 8, 2022
1 parent 30fc838 commit 7aaf2d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/generator/templates/api/lib/schema.mako
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ ${struct} {
#[serde(with = "client::serde::duration")]
% elif p.get("format") == "google-fieldmask":
#[serde(with = "client::serde::field_mask")]
% elif p.get("format") in {"uint64", "int64"} and p["type"] == "string":
#[serde(with = "client::serde::str_like")]
% endif
pub ${mangle_ident(pn)}: ${to_rust_type(schemas, s.id, pn, p, allow_optionals=allow_optionals)},
% endfor
Expand Down

0 comments on commit 7aaf2d5

Please sign in to comment.