refactor: return the modified interfaces for further modification
This commit is contained in:
@ -51,15 +51,13 @@ public static class SwaggerConfiguration
|
||||
options.IncludeXmlComments(Path.Combine(basePath, "ApiDtoDocs.xml"));
|
||||
});
|
||||
|
||||
services.AddTransient<IConfigureOptions<SwaggerGenOptions>, ConfigureSwaggerOptions>();
|
||||
|
||||
return services;
|
||||
return services.AddTransient<IConfigureOptions<SwaggerGenOptions>, ConfigureSwaggerOptions>();
|
||||
}
|
||||
|
||||
public static IApplicationBuilder UseCustomSwagger(this IApplicationBuilder app, IServiceProvider services)
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(options =>
|
||||
return app.UseSwaggerUI(options =>
|
||||
{
|
||||
options.InjectStylesheet($"{UrlHelper.GetSubPath}css/swagger/SwaggerDark.css");
|
||||
var provider = services.GetService<IApiVersionDescriptionProvider>();
|
||||
@ -72,7 +70,5 @@ public static class SwaggerConfiguration
|
||||
options.RoutePrefix = UrlHelper.GetSubPathSwagger.Trim('/');
|
||||
}
|
||||
});
|
||||
|
||||
return app;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user