Open elipp opened 1 week ago
I did try the #[serde_as]
macro from the serde_with
crate with feature=schemars_0_8
enabled, but couldn't figure out how to make it work.
Ended up just manually impl JsonSchema
ing (examples can be found on the schemars docs.)
I think adding #[schemars(with = "serde_json::Number"]
to field
would make it work
Consider the following struct:
Compilation fails with: error[E0573]: expected type, found module
rust_decimal::serde::arbitrary_precision
How can I make that work? Ideally, I'd like this Decimal field to show up as a JSON number in the spec.