title: Swagger JSON relative path
body: <p>In my ASP 4.6 application I have:</p>
  
  <pre><code>app.UseSwaggerUI(c =&gt; { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Feature Toggle API V1"); });
  </code></pre>
  
  <p>When I run it on <code>localhost:5000/swagger/v1/swagger.json</code> it works fine but when I deploy it on a remote server that uses virtual directories for different applications <code>someserver/myapp/swagger/v1/swagger.json</code> it doesn't work.</p>
  
  <p>What is the best practice in turning <code>app.UseSwaggerUI(c =&gt; { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Feature Toggle API V1"); });</code>to a relative path that works on localhost as well as within a virtual directory?</p>