Commit 9c81e65b by zry

remove swagger

parent de545122
...@@ -95,10 +95,10 @@ public void ConfigureServices(IServiceCollection services) ...@@ -95,10 +95,10 @@ public void ConfigureServices(IServiceCollection services)
.Configure<Application>(Configuration.GetSection("Application")) .Configure<Application>(Configuration.GetSection("Application"))
.Configure<HuyiSmsConfig>(Configuration.GetSection("HuyiSmsConfig")); .Configure<HuyiSmsConfig>(Configuration.GetSection("HuyiSmsConfig"));
services.AddSwaggerGen(c => //services.AddSwaggerGen(c =>
{ //{
c.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" }); // c.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" });
}); //});
//huyi短信发送注入 //huyi短信发送注入
services.AddScoped<HuyiSmsNotify>(); services.AddScoped<HuyiSmsNotify>();
...@@ -125,16 +125,16 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF ...@@ -125,16 +125,16 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
{ {
app.UseStatusCodePagesWithReExecute("/error/{0}"); app.UseStatusCodePagesWithReExecute("/error/{0}");
} }
// Enable middleware to serve generated Swagger as a JSON endpoint. //// Enable middleware to serve generated Swagger as a JSON endpoint.
app.UseSwagger(); //app.UseSwagger();
// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), //// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
// specifying the Swagger JSON endpoint. //// specifying the Swagger JSON endpoint.
app.UseSwaggerUI(c => //app.UseSwaggerUI(c =>
{ //{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); // c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
c.RoutePrefix = string.Empty; // c.RoutePrefix = string.Empty;
}); //});
loggerFactory.CreateLogger<Startup>().LogDebug(env.EnvironmentName); loggerFactory.CreateLogger<Startup>().LogDebug(env.EnvironmentName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment