Yes, I agree that DRY is not the only principle that will help your code to be more extendable. You need to follow the SOLID principle. But the example you gave, is the pure separation of knowledge. As I already mentioned above, there can be duplicate codes that don't violate the DRY principle. Your example perfectly fits there. Maybe two endpoints can have similar nested POJOs but their knowledge is different. They are defining different logic. You should be creating multiple POJO objects for similar responses. Thanks for poniting it out Michał Dobrzanski .
