You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the feedback! The interaction with schemars sounds promising. I guess one could start with being able to derive from JsonSchema, and handle the actual schema output separately?
For the JsonSchema derivation: one could rely on schemars' serde compatibilty to write something like:
#[derive(JsonSchema,Tree)]structSettings{#[serde(skip)]// or #[schemars(skip)]#[tree(skip)]foo:Leaf<bool>,// ...}
but the duplication is ugly and even more annoying for rename.
The easy way around would be to forward the serde or schemars attributes to the Tree derive, but that would heavily break the existing API. Writing the schemars/serde attributes from the tree ones won't work with a derive macro (but with an attribute one). Optionally adding the JsonSchema implementation as Tree derive is not so easy, because the implementation functions are not exported by schemars.
Is there tooling or preliminary work looking into exporting a schema for the settings described by
miniconf
?In particular for MQTT, something like asyncapi could be nice and provide a way to automatically document the settings.
The text was updated successfully, but these errors were encountered: