I am building a new system, which I will call S, that needs to get some data from another system, which I'll name D. System D provides a client and a collection of classes(POJOs) to represent the responses in memory. Instead of using the client directly everywhere, I am writing a sort of adapter which will handle all the interactions with the dependency.
Now, to stay true to my initial goal of letting the adapter handle all the interactions, I don't think it is good idea to let the adapter class return data using the POJOs provided by system D because the rest of my system(S) would, in some way, know a lot about system D, which is what I want to avoid in the first place. My concern is that to achieve this ideal, I would have to write the equivalent(not identical, only the data I need) POJOs in my system when system D already provides those for free.
Do you know of a design principle that could help me decide(support my idea) in this situation?
If you have faced this situation before, how have you approached it?
UPDATE: Thanks for your comments, they helped. I went for the less coupling, more POJOs approach and I think it was a good idea in my situation because later I realized that we need to combine a few POJOs provided by system D to make things more convenient for the new system, so it's not exactly a 1-1 relation.