schemars icon indicating copy to clipboard operation
schemars copied to clipboard

Add implementations for the time crate

Open jetuk opened this issue 2 years ago • 4 comments

This adds a new feature, time, which enables the time crate. JsonSchema implementations are provided for the time::{OffsetDateTime, PrimitiveDateTime, Date, Time}. The existing time modules are renamed to std_time.

jetuk avatar Dec 01 '23 12:12 jetuk

@GREsau Can you please accept this PR? Thanks.

jnicholls avatar Aug 07 '24 20:08 jnicholls

I'd also love to use this feature, I prefer time over chrono. If it helps increase the priority, there's another PR to add this feature: https://github.com/GREsau/schemars/pull/207

dspatoulas avatar Aug 15 '24 18:08 dspatoulas

I'd also like this added. In my current API, I copied this implementation of JsonSchema for PrimitiveDateTime into a helper function so I could use it.

rdrpenguin04 avatar Aug 27 '24 18:08 rdrpenguin04

I've rebased this against current master if that helps. However, it looks like there's an issue with MSRV with one of time's dependencies.

jetuk avatar Sep 02 '24 20:09 jetuk