-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We often have the situation, where a more complex domain model must be mapped to an api with a flat request/response model.
For example:
data class Car(
val engine: Engine
val numberOfWheels: Int
)
data class Engine(
val horsePower: Int
)
should be mapped to
data class CarResponse(
val horsePower: Int
val numberOfWheels: Int
)
I didn't find an easy way to tell Mappie, that I want all properties of the child (Engine) mapped to the response (CarResponse) .
It might be easy/obvious in this case to just map this single property, but things get a little unwieldy, if there are a lot of child properties involved.
Same is true the other way round as well. Imagine a flat request model, which has to be mapped to a more structured domain model.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request