How to use Swagger as Welcome Page of IAppBuilder in WebAPI

后端 未结 12 1392
遥遥无期
遥遥无期 2020-12-24 05:59

I try to use Swagger with Microsoft WebAPI 2.

For the moment, I\'ve the following call in a method.

appBuilder
   .ConfigureOAuth()
   .UseWebApi(con         


        
12条回答
  •  醉梦人生
    2020-12-24 06:47

    For Asp.Net core use this:

    app.Run(context => {
                context.Response.Redirect("swagger/ui");
                return Task.CompletedTask;
            });
    

提交回复
热议问题