But everyone is telling me it's a bad idea, so I'm really not sure. A more convenient way to copy properties over would be nice.
But everyone is telling me it's a bad idea, so I'm really not sure. A more convenient way to copy properties over would be nice.
If you add a property which shouldn't be public you have to separate them. For example in the domain model you have a user with email but do not want to expose the email.
Second argument: I usually create a simple struct for each method. For example I do not want, that they provide the id for post requests. I want to send the id on get requests so that they can send an update request with the id. I prefer only "non-null" arguments and as a bonus you get a clean (auto-generated) api documentation.
You can usually configure that out with @JsonIgnore or something like that. Although this works only for this particular (very simple) example and won't help with e.g. flattening multiple nested objects.
Another possible problem: having to support two versions of the API at the same time.