Реализован модуль каталога, миграции, сваггер
This commit is contained in:
+7
-2
@@ -2,6 +2,8 @@ using System.Text;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Nashel.Modules.Catalog.Infrastructure;
|
||||
using Nashel.Modules.Catalog.Presentation.Endpoints;
|
||||
using Nashel.Modules.Identity.Infrastructure;
|
||||
using Nashel.Modules.Identity.Presentation.Endpoints;
|
||||
|
||||
@@ -41,7 +43,6 @@ builder.Services.AddSwaggerGen(options =>
|
||||
var xmlFiles = Directory.GetFiles(AppContext.BaseDirectory, "*.xml");
|
||||
foreach (var xmlFile in xmlFiles)
|
||||
{
|
||||
// Исключаем системные сборки, берем только наши, если нужно, или просто все
|
||||
options.IncludeXmlComments(xmlFile);
|
||||
}
|
||||
});
|
||||
@@ -49,6 +50,9 @@ builder.Services.AddSwaggerGen(options =>
|
||||
// Регистрация модуля Identity
|
||||
builder.Services.AddIdentityModule(builder.Configuration);
|
||||
|
||||
// Регистрация модуля Catalog
|
||||
builder.Services.AddCatalogModule(builder.Configuration);
|
||||
|
||||
// Настройка аутентификации
|
||||
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||
.AddJwtBearer(options =>
|
||||
@@ -83,7 +87,8 @@ if (app.Environment.IsDevelopment())
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
// Маппинг эндпоинтов модуля Identity
|
||||
// Маппинг эндпоинтов
|
||||
app.MapIdentityEndpoints();
|
||||
app.MapCatalogEndpoints();
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user