title: How to change base url of Swagger in ASP.NET core
body: <p>By default when you enable swagger in ASP.NET Core project it's available on url:</p>
  
  <pre><code>http://localhost:&lt;random_port&gt;/swagger/ui
  </code></pre>
  
  <p>I would like to use a different base url instead of <code>/swagger/ui</code>. How/where can i configure that?</p>
  
  <p>I found that for older versions you can configure the <code>RootUrl</code> but there aren't similiar method in ASP.NET Core:</p>
  
  <pre><code>.EnableSwagger(c =&gt;
  {
      c.RootUrl(req =&gt; myCustomBasePath);
  });
  </code></pre>