Реализован модуль каталога, миграции, сваггер

This commit is contained in:
Халимов Рустам
2026-02-10 15:32:40 +03:00
parent 4c9e44e992
commit 9d3999f690
40 changed files with 1665 additions and 4 deletions
+7 -2
View File
@@ -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();