Исправления сваггер

This commit is contained in:
Халимов Рустам
2026-02-11 13:24:56 +03:00
parent 3b2c0029a1
commit b7ba835689
9 changed files with 210 additions and 47 deletions
@@ -25,7 +25,7 @@ public static class CatalogEndpoints
return Results.Ok(id);
})
.WithName("CreateCategory")
.WithSummary("Создать категорию (Admin)");
.WithOpenApi(operation => new(operation) { Summary = "Создать категорию (Admin)", Description = "Создает новую категорию. Требуются права администратора." });
catalogGroup.MapGet("/categories", async (ISender sender) =>
{
@@ -33,7 +33,7 @@ public static class CatalogEndpoints
return Results.Ok(result);
})
.WithName("GetCategories")
.WithSummary("Получить все категории (плоский список с ParentId)");
.WithOpenApi(operation => new(operation) { Summary = "Получить все категории", Description = "Возвращает плоский список категорий с указанием ParentId для иерархии." });
// --- Услуги (Offers) ---
@@ -43,7 +43,7 @@ public static class CatalogEndpoints
return Results.Ok(id);
})
.WithName("CreateOffer")
.WithSummary("Создать оффер/услугу");
.WithOpenApi(operation => new(operation) { Summary = "Создать оффер/услугу", Description = "Создает новое предложение услуги в указанной категории." });
catalogGroup.MapGet("/offers/{id:guid}", async (Guid id, ISender sender) =>
{
@@ -51,6 +51,6 @@ public static class CatalogEndpoints
return result is not null ? Results.Ok(result) : Results.NotFound();
})
.WithName("GetOfferById")
.WithSummary("Получить детали услуги по ID");
.WithOpenApi(operation => new(operation) { Summary = "Получить детали услуги по ID", Description = "Возвращает полную информацию об услуге." });
}
}