nswag 404 after enabling owin startup

I had an existing global.asax project that I added nswag to without issue following this set of instructions:

https://github.com/RSuter/NSwag/wiki/OwinGlobalAsax

However, I later setup an oauth server in the same project. In that case I added an OwinStartup file and undid step #2 in the above link by setting AutomaticAppStartup back to true:

  <add key="owin:AutomaticAppStartup" value="true" /> <!--https://github.com/RSuter/NSwag/wiki/OwinGlobalAsax-->

I was successfully able to use my oauth server, but without the AutomaticAppStartup value set to false, the /Swagger link simply returns 404. I tried moving the swagger startup to the OwinStartUp menthod but that also did not work.

OwinStartup (swagger doesn't work):

public partial class OwinStartup
{
    public void Configuration(IAppBuilder app)
    {
        //DOESN'T WORK
        ConfigureSwagger(app);
        //DOES WORK
        ConfigureOAuth(app);

        WebApiConfig.Register(new HttpConfiguration());
    }

    public void ConfigureSwagger(IAppBuilder app)
    {
        app.UseSwaggerUi(typeof(MvcApplication).Assembly, settings =>
                {
                //settings.GeneratorSettings.ActualSerializerSettings.Converters.Add(new HypermediaInjectorJsonConverter());
                //settings.GeneratorSettings.ContractResolver = new HypermediaContractResolver();
                settings.MiddlewareBasePath = "/swagger";
                    settings.GeneratorSettings.Title = "My API";
                });
    }
    public static void ConfigureOAuth(IAppBuilder app)
    {


        //var secret = TextEncodings.Base64Url.Decode(ConfigurationManager.AppSettings["secret"]);
        var secret = Security.Secret;

        app.UseJwtBearerAuthentication(new JwtBearerAuthenticationOptions
        {

            AuthenticationMode = AuthenticationMode.Active,
            AllowedAudiences = new[] { Security.Audience },
            IssuerSecurityKeyProviders = new IIssuerSecurityKeyProvider[]
            {
                new SymmetricKeyIssuerSecurityKeyProvider(CustomJwtFormat.Issuer, CustomJwtFormat.Secret)
            }
        });
        app.UseOAuthAuthorizationServer(new OAuthAuthorizationServerOptions
        {
            AllowInsecureHttp = true,
            TokenEndpointPath = new PathString("/oauth2/token"),
            AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(30),
            Provider = new CustomOAuthProvider(),
            AccessTokenFormat = new CustomJwtFormat()
        });
    }

}

Global.asax (oauth doesn't work):

    protected void Application_Start()
    {
        HypermediaConfig.Setup();

       //DOES WORK!
        RouteTable.Routes.MapOwinPath("swagger", app =>
        {
            OwinStartup.ConfigureSwagger(app);
        });

        AreaRegistration.RegisterAllAreas();
        GlobalConfiguration.Configure(WebApiConfig.Register);
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);
        BundleConfig.RegisterBundles(BundleTable.Bundles);

        //DOESN'T WORK
        RouteTable.Routes.MapOwinPath("oauth2", app =>
        {
            OwinStartup.ConfigureOAuth(app);
        });


    }

I'm currently in the process of creating a new owin project to see if that resolves the issue. However, I would still like to understand the issues with the cases above:

Why is nswag not working (404) when initialized via OwinStartup in an global.asax website?

And oauth not working (404) when initialized via global.asax?