title: Swagger - how to use swagger-codegen and build a project on the long term
body: <p>The Swagger project is wonderful to create easily client and server apps in every language, but I don't understand how to maintain or extend an existing project in a proper way. </p>
  
  <p>I'm generating a Java server - language parameter is <code>jaxrs-spec</code>.</p>
  
  <p>I have written my own <code>Maven</code> pom and using the <code>swagger-codegen-maven-plugin</code> and so now I'm able to generate model or api directly with maven.</p>
  
  <p>I see that every time I rebuild my project the API will be completely rewritten by <code>swagger-codegen</code> plugin.</p>
  
  <p>I need to implement my application logic, and at moment I didn't see any other way than customise the generated API sources.
  So, to avoid loosing my work at every build I could configure the <code>.swagger-codegen-ignore</code> (and I did), but I had only postponed the problem.</p>
  
  <p>Because first time I have to update the <code>swagger.json</code>, the only option I have is to regenerate the entire API and overwrite my work. Ok, I could use git and try to restore the removed part, but is really an ugly solution.</p>
  
  <p>So, the question is:</p>
  
  <p>using <code>swagger-codegen</code> (or Swagger in general) is there a pattern, an how to, a documented way that allow me to add a behaviour and/or extend the generated APIs without overwrite my code?</p>