title: Best Practices for incoming and outgoing DTOs
body: <p>I'm facing an API design issue. Consider the following flow:</p>
  
  <p><a href="https://i.stack.imgur.com/2V7a3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2V7a3.png" alt="flow"></a></p>
  
  <p>As you can see, I have 2 classes to represent my model (<code>SomethingDTO</code> and <code>SomethingResponse</code>) and 2 classes to represent the 3rd party model (<code>3rdPartyRequest</code> and <code>3rdPartyResponse</code>).  I'm using a mapper to provide translation from the 3rdPArty model classes to my model classes.</p>
  
  <p>The problem is: all these 4 classes have exactly the same attributes.</p>
  
  <p>Should I repeat these attributes through all these classes? Should I have only one DTO class for the whole flow?</p>
  
  <p>What is the best practice (or pattern) to solve this?</p>
  
  <p>Thanks</p>