Files
DotNetAngular/src/API/Extension/ServiceCollectionExtensions.cs
T
Natlinux81 d5f6034a28 initial
2025-04-21 16:55:15 +02:00

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;
}
}