title: Swagger is not generating swagger.json
body: <p>I have the asp.net core MVC project and separate WebApi project in one solution. I'm adding the swagger following the documentation on github. Here is my Startup.cs of mvc project:</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
      {
          //...
          // Adding controllers from WebApi:
          var controllerAssembly = Assembly.Load(new AssemblyName("WebApi"));
          services.AddMvc(o =&gt;
              {
                  o.Filters.Add&lt;GlobalExceptionFilter&gt;();
                  o.Filters.Add&lt;GlobalLoggingFilter&gt;();
              })
              .AddApplicationPart(controllerAssembly)
              .AddJsonOptions(options =&gt;
              {
                  options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
              });
  
          services.AddSwaggerGen(c =&gt;
          {
              //The generated Swagger JSON file will have these properties.
              c.SwaggerDoc("v1", new Info
              {
                  Title = "Swagger XML Api Demo",
                  Version = "v1",
              });
          });
  
          //...
      }
  
      public void Configure(IApplicationBuilder app, IHostingEnvironment env)
      {
          //...
          app.UseSwagger();
          app.UseSwaggerUI(c =&gt;
          {
              c.SwaggerEndpoint("/swagger/v1/swagger.json", "Swagger XML Api Demo v1");
          });
  
          //...
  
          app.UseMvc(routes =&gt;
          {
              // ...
              routes.MapRoute(
                  name: "default",
                  template: "{controller=Home}/{action=Index}/{id?}");
          });
      }
  </code></pre>
  
  <p>Here are the nugets:</p>
  
  <p><a href="https://i.stack.imgur.com/fzudc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fzudc.png" alt="nugets"></a></p>
  
  <p>The WebApi controllers Attribute routing:</p>
  
  <pre><code>[Route("api/[controller]")]
  public class CategoriesController : Controller
  {
      // ...
      [HttpGet]
      public async Task&lt;IActionResult&gt; Get()
      {
          return Ok(await _repo.GetCategoriesEagerAsync());
      }
      // ...
  }
  </code></pre>
  
  <p>When I'm trying to go to /swagger it doesn't find the /swagger/v1/swagger.json:
  <a href="https://i.stack.imgur.com/7VJBV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7VJBV.png" alt="Json not found"></a></p>
  
  <p>What I'm doing wrong?</p>
  
  <p>Thanks in advance!</p>