Commit a53edfdf by 钟博

swagger

parent 37a09568
......@@ -43,13 +43,16 @@ public void ConfigureServices(IServiceCollection services)
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
string swaggerJson = "/api/swagger/v1/swagger.json";
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Performance.Subsidy.Api v1"));
swaggerJson = swaggerJson.Replace("/api", "");
}
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint(swaggerJson, "Performance.Subsidy.Api v1"));
app.UseRouting();
app.UseAuthorization();
......
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