We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a struct field with a type like this: toml::map::Map<String, Value>
toml::map::Map<String, Value>
Schemars can't deal with this. What's a good way to fix this?
The text was updated successfully, but these errors were encountered:
I'm trying to follow this but it looks like it's something of a rabbit hole? https://graham.cool/schemars/examples/5-remote_derive/
Sorry, something went wrong.
The easiest way to achieve this would be do decorate those fields with #[serde(with = "T")] where T has an equivalent schema, e.g. BTreeMap
#[serde(with = "T")]
T
use std::collections::BTreeMap; #[derive(JsonSchema)] pub struct MyType { #[serde(with = "BTreeMap::<String, Value>")] my_map: toml::map::Map<String, Value>, }
No branches or pull requests
I have a struct field with a type like this:
toml::map::Map<String, Value>
Schemars can't deal with this. What's a good way to fix this?
The text was updated successfully, but these errors were encountered: