initial
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user