title: Swagger integration for multiple jaxrs servers
body: <p>Is it possible to configure swagger for multiple jaxrs servers (multiple subsystems) using one Swagger config with common basepath? 
  For example:</p>
  
  <p><strong>Servlet configuration:</strong></p>
  
  <pre><code>&lt;init-param&gt;
      &lt;param-name&gt;swagger.api.basepath&lt;/param-name&gt;
      &lt;param-value&gt;http://localhost:9000/services&lt;/param-value&gt;
  &lt;/init-param&gt;
  </code></pre>
  
  <p><strong>Context.xml configuration</strong></p>
  
  <p>Server 1:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;jaxrs:server id="sampleServer" address="/swaggerSample/v1"&gt;
          &lt;jaxrs:serviceBeans&gt;
              &lt;ref bean="sampleResource1" /&gt;
          &lt;/jaxrs:serviceBeans&gt;
          &lt;jaxrs:providers&gt;
              &lt;ref bean="jsonProvider" /&gt;
              &lt;ref bean="multipartProvider" /&gt;
          &lt;/jaxrs:providers&gt;
          &lt;jaxrs:features&gt;
              &lt;ref bean="swagger2Feature" /&gt;
          &lt;/jaxrs:features&gt;
  &lt;/jaxrs:server&gt;
  </code></pre>
  
  
  
  <p>Server 2:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;jaxrs:server id="sampleServer" address="/swaggerSample/v2"&gt;
          &lt;jaxrs:serviceBeans&gt;
              &lt;ref bean="sampleResource2" /&gt;
          &lt;/jaxrs:serviceBeans&gt;
          &lt;jaxrs:providers&gt;
              &lt;ref bean="jsonProvider" /&gt;
              &lt;ref bean="multipartProvider" /&gt;
          &lt;/jaxrs:providers&gt;
          &lt;jaxrs:features&gt;
              &lt;ref bean="swagger2Feature" /&gt;
          &lt;/jaxrs:features&gt;
  &lt;/jaxrs:server&gt;
  </code></pre>
  
  
  
  <p><strong>Server 1:</strong></p>
  
  <p>Expected result: <code>http://localhost:9000/services/swaggerSample/v1/sample/{name}</code></p>
  
  <p>Actual result: <code>http://localhost:9000/services/sample/{name}</code></p>
  
  <p><strong>Server 2:</strong>
  Server 2 takes old basepath from server 1:</p>
  
  <p>Expected result: <code>http://localhost:9000/services/swaggerSample/v2/sample/{name}</code></p>
  
  <p>Actual result: <code>http://localhost:9000/services/sample/{name}</code></p>