Open arouel opened 10 years ago
The broad concept seems pretty reasonable. The idea is to allow for manually defined data types, right?
Exactly, I think here about common and custom data types. For example I wanna maintain in my own project org.joda.time.DataTime
and some own algebraic data type. At the moment we only support case classes by default but this is too restricted for my use case.
I implemented the entry point for the custom serializers with commit 085792b02186a18aa6313f006330296e659acfc4. I'm not certain how I feel about it right now, but I'm having trouble coming up with a better, workable alternative.
I like it. Maybe we use it in an example with JSON HAL and look how it works.
After juggling around with JSON HAL and Swagger I think we need an extension point in
SwaggerSupport
to be able to add custom transformations for data types. The signature could beA <: AnyRef => ModelProperty
orPartialFunction[A <: AnyRef, ModelProperty]
.I think it should basically work as the serializers in Json4s. Maybe we can borrow some code there. Opinions?