metosin / ring-swagger

Swagger Spec for Clojure Web Apps
http://metosin.github.io/ring-swagger/doc/
371 stars 84 forks source link

Support java.time coercion #114

Closed mtkp closed 8 years ago

mtkp commented 8 years ago

Taking a crack at #107 - support for java.time.Instant, java.time.LocalDate, and java.time.LocalTime.

I haven't written tests for java.time-specific extensions yet... should these tests be conditionally evaluated as well, to only run tests if testing in an environment that has java 1.8+?

mtkp commented 8 years ago

Regarding my question in the PR description - I forged ahead with tests that are isolated with the same extension wrapper as the source extensions.

ikitommi commented 8 years ago

👍

ikitommi commented 8 years ago

Thanks for the contribution!

mtkp commented 8 years ago

No problem! @ikitommi - I mentioned this in a comment above... what are your thoughts on making joda-time/clj-time an optional dependency using this extension approach?

ikitommi commented 8 years ago

I think it's a good idea. We are finalizing Muuntaja, which uses similar approach with ring versions.

antonmos commented 3 years ago

is there a reason why support for java.time.LocalDateTime was not included in this PR? was it intentional or accidental? Thanks!