Closed antoine-de closed 5 years ago
std::mem::size_of
can be indeed used to determine the bytes size of usize
: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9b1f89c570ba37fc158c9d7dac6934cd
I also think that it is actually ok to assume that usize has 64 bits for APIs. In any case, thanks for the PR. I merge it, and if you want, you can create another one with usize adjustments.
and also change the schema_type from
number
to the more preciseinteger
For u|isize, it's not very clear if we can drop the
format
field.It seems ok for swagger v3 doc, but the case is not listed in openapi.
I supposed it was a mistake from openapi, but we could also maybe do some clever trick with
std::mem::size_of
?