Files
DotNetAngular/src/API/Extension/ServiceCollectionExtensions.cs
T
2026-02-05 20:07:50 +01:00

19 lines
600 B
C#

using Microsoft.OpenApi;
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;
}
}