Fork me on GitHub
#yada
<
2016-02-05
>
imre14:02:30

@malcolmsparks: is there a way to provide custom coercions for the request body?

imre14:02:31

My usecase is the following: - domain is expecting a year-month field with I represent by java.time.YearMonth (I thing java 8 took that from joda time) - the recommendation for datetimes in over http is to use the 2016-02-05T14:45:45+00:00 format or sub-varieties of that like 2016-02-05 - I would like the api layer to do this conversion for me, can this be done in yada config or will I have to write my own conversion layer and just expect strings?

malcolmsparks14:02:31

It's been requestes by others

imre14:02:50

okay so for now I guess I need to do some processing of my own

malcolmsparks16:02:15

Right now you can avoid using a body parameter and process it yourself. I'm not sure how Swagger presents complex schemas and you'd soon be at the limits of what ring-swagger can do.