title: How to handle api version cleanly in url in Play Framework (2.4.x)?
body: <p>So currently my routes file is a series of routes with a hardcoded version.</p>
  
  <pre><code>GET    /v1/companies/$id&lt;[-a-zA-Z0-9]+&gt;/etwasX    controllers.Company.etwasX(id:String, q: Option[String])
  GET    /v1/companies/$id&lt;[-a-zA-Z0-9]+&gt;/etwasY    controllers.Company.etwasY(id:String, q: Option[String])
  </code></pre>
  
  <p>I have about some 30 routes defined. Now I would like to support different versions. I thought I could simply do this:</p>
  
  <pre><code>GET    /v&lt;[0-9]+&gt;/companies/$id&lt;[-a-zA-Z0-9]+&gt;/etwasX    controllers.Company.etwasX(id:String, q: Option[String])
  </code></pre>
  
  <p>But it doesn't work, and if I define it with a $</p>
  
  <pre><code>GET    /v$version&lt;[0-9]+&gt;/companies/$id&lt;[-a-zA-Z0-9]+&gt;/etwasX    controllers.Company.etwasX(id:String, q: Option[String])
  </code></pre>
  
  <p>Then it complains I don't have a version parameter in the controller method. Is there any other way beside specifying the version in every controller method?</p>
  
  <p>If not, is there a way I could somehow automatically generate the routes for all the supported versions (assuming for now that they would have the same definition)?</p>