Исправления сваггер
This commit is contained in:
@@ -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 = "Возвращает полную информацию об услуге." });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user