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
Hi! This project looks very promising for generating auto documentation for Rocket web servers. I'd like to integrate this into my application, but to do that I need a couple of derivations of JsonSchema that currently don't exists. Mainly, the chrono types for datetimes and tuple structs. Is this something that is on the roadmap, or that you might be able to help me implement myself?
The text was updated successfully, but these errors were encountered:
I'd like to have a general way of allowing derivations of JsonSchema for types in remote crates, which would probably be done with a #[schema(with = "TypeInMyCrate") attribute (where TypeInMyCrate implements JsonSchema), so that it can easily work with serde's remote deriving feature.
That said, for particularly popular crates like chrono, I think it's reasonable to add implementations of some types directly in schemars under a feature flag.
And JsonSchema will definitely be deriveable for tuple structs at some point, it's just not something I've gotten around to implementing yet
In v0.1.8 you can now derive JsonSchema for tuple structs, and all serializable chrono types (Weekday, NaiveDate, NaiveDateTime, NaiveTime and DateTime) now have JsonSchema implementations under a feature flag.
schemars = { version = "0.1.8", features = ["chrono"] }
Hi! This project looks very promising for generating auto documentation for Rocket web servers. I'd like to integrate this into my application, but to do that I need a couple of derivations of JsonSchema that currently don't exists. Mainly, the
chrono
types for datetimes and tuple structs. Is this something that is on the roadmap, or that you might be able to help me implement myself?The text was updated successfully, but these errors were encountered: