19 lines
607 B
C#
19 lines
607 B
C#
using Microsoft.OpenApi.Models;
|
|
|
|
namespace API.Extension;
|
|
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddWebServices(this IServiceCollection services)
|
|
{
|
|
services.AddSwaggerGen(options =>
|
|
{
|
|
// update the name and version of the document
|
|
options.SwaggerDoc("v1", new OpenApiInfo { Title = "DotNetAngular API", Version = "v1" });
|
|
// update names of the api
|
|
options.SwaggerGeneratorOptions.DocumentFilters.Add(new LowerCaseDocumentFilter());
|
|
|
|
});
|
|
return services;
|
|
}
|
|
} |