title: Why not to consider models in REST API versioning?
body: <p>There was an answer to <a href="https://stackoverflow.com/questions/34075588/rest-api-versioning-why-arent-models-versioned">similar question</a> but that was too specific to an example and doesn't answer in general.</p>
  
  <p>Can any one please tell how to handle the below scenario if models are not versioned?</p>
  
  <pre><code>PUT /v1/users
  username (string)
  email (string) (required)
  password (string) (required)
  </code></pre>
  
  <pre><code>POST /v2/users
  username (string) (required)
  email (string) required
  password (string) (required)
  </code></pre>
  
  <p>Assuming the model name is <strong>UserModel</strong>, in v1 version username is optional but in V2 it's required.</p>
  
  <p>If we use a schema validator like ajv, it fails even for v1 api requests as the latest specification/model mentions username is required field. </p>
  
  <p>There should be a strong reason for everyone saying models shouldn't be versioned but I might be missing something clearly. Here in this case, versioning the models makes more sense as it doesn't break backward compatibility easily.</p>