title: Failed to load API definition Fetch Error, when deployed but fine on localhost
body: <p>I am upgrading my api from netcore2.1 to 3.1 </p>
  
  <p>When I run on localhost the UI works fine.</p>
  
  <p>When I deploy via Azure DevOps and go to the myapplication/myapi/swagger.html url I get</p>
  
  <pre><code>Failed to load API definition 
  Fetch Error
  Service Unavailable /myapi/swagger/v1/swagger/json
  </code></pre>
  
  <p>Yet I can see the json  at </p>
  
  <pre><code>myapplication/myapi/swagger/v1/swagger.json
  </code></pre>
  
  <p>I have the following </p>
  
  <pre><code>   public static IApplicationBuilder UseSwaggerDocumentation(this IApplicationBuilder app)
      {
          app.UseSwagger(c =&gt;
  
              c.RouteTemplate = "myapi/swagger/{documentName}/swagger.json"
          );
  
          app.UseSwaggerUI(c =&gt;
          {
  
              c.SwaggerEndpoint("/myapi/swagger/v1/swagger.json", "Versioned API v1.0");
  
              c.RoutePrefix = "myapi/swagger";
  
          });
  
          return app;
      }
  </code></pre>
  
  <p>I am using </p>
  
  <pre><code>Swashbuckle.AspNetCore (5.2.0)
  </code></pre>