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
Would it be possible to have a slightly different variant of TransformerInto.enableUnsafeOption, which instead of throwing exceptions would return a value, like cats.data.Validated (or something analogous, like Either).
Our use case is that we would like to convert ScalaPB generated case classes (where everything is Optional) to our domain case classes where some fields are mandatory. It would help us a lot, if the convertor method returned just a plain value (Validated, Either,...) instead of throwing and us having to catch the exceptions.
It would behave similar to henkan which also has validate method to return cats.data.Validated.
The text was updated successfully, but these errors were encountered:
#146 implements what you described, but before we decide to merge and release it, it would be good if more eyes looked at it and maybe tested their use cases.
Would it be possible to have a slightly different variant of
TransformerInto.enableUnsafeOption
, which instead of throwing exceptions would return a value, likecats.data.Validated
(or something analogous, likeEither
).Our use case is that we would like to convert ScalaPB generated case classes (where everything is
Option
al) to our domain case classes where some fields are mandatory. It would help us a lot, if the convertor method returned just a plain value (Validated, Either,...) instead of throwing and us having to catch the exceptions.It would behave similar to
henkan
which also hasvalidate
method to returncats.data.Validated
.The text was updated successfully, but these errors were encountered: