diff --git a/BACKEND/Codex.Api/Endpoints/ManualEndpointRegistration.cs b/BACKEND/Codex.Api/Endpoints/ManualEndpointRegistration.cs
index 2ea7c8a..483954b 100644
--- a/BACKEND/Codex.Api/Endpoints/ManualEndpointRegistration.cs
+++ b/BACKEND/Codex.Api/Endpoints/ManualEndpointRegistration.cs
@@ -12,245 +12,39 @@ using PoweredSoft.DynamicQuery.Core;
namespace Codex.Api.Endpoints;
///
-/// Manual endpoint registration to ensure proper OpenAPI documentation for all CQRS endpoints.
-/// Required because OpenHarbor.CQRS doesn't auto-generate Swagger docs for commands with return values and dynamic queries.
+/// Manual endpoint registration for endpoints requiring custom OpenAPI documentation.
+/// OpenHarbor.CQRS v8.1.0-rc1 auto-registers and auto-documents all ICommandHandler implementations.
+/// Manual registration should only be used for advanced customization needs.
///
public static class ManualEndpointRegistration
{
public static WebApplication MapCodexEndpoints(this WebApplication app)
{
// ============================================================
- // COMMANDS
+ // COMMANDS - AUTO-REGISTERED BY OPENHARBOR.CQRS
// ============================================================
-
- // CreateAgent - No return value (already auto-documented by OpenHarbor)
- // UpdateAgent - No return value (already auto-documented by OpenHarbor)
- // DeleteAgent - No return value (already auto-documented by OpenHarbor)
-
- // CreateConversation - Returns Guid
- app.MapPost("/api/command/createConversation",
- async ([FromBody] CreateConversationCommand command,
- ICommandHandler handler) =>
- {
- var result = await handler.HandleAsync(command);
- return Results.Ok(new { id = result });
- })
- .WithName("CreateConversation")
- .WithTags("Commands")
- .WithOpenApi(operation => new(operation)
- {
- Summary = "Creates a new conversation for grouping related messages",
- Description = "Returns the newly created conversation ID",
- RequestBody = new OpenApiRequestBody
- {
- Required = true,
- Content = new Dictionary
- {
- ["application/json"] = new OpenApiMediaType
- {
- Schema = new OpenApiSchema
- {
- Reference = new OpenApiReference
- {
- Type = ReferenceType.Schema,
- Id = nameof(CreateConversationCommand)
- }
- }
- }
- }
- },
- Responses = new OpenApiResponses
- {
- ["200"] = new OpenApiResponse
- {
- Description = "Conversation created successfully",
- Content = new Dictionary
- {
- ["application/json"] = new OpenApiMediaType
- {
- Schema = new OpenApiSchema
- {
- Type = "object",
- Properties = new Dictionary
- {
- ["id"] = new OpenApiSchema
- {
- Type = "string",
- Format = "uuid",
- Description = "The unique identifier of the created conversation"
- }
- }
- }
- }
- }
- },
- ["400"] = new OpenApiResponse { Description = "Validation failed" },
- ["500"] = new OpenApiResponse { Description = "Internal server error" }
- }
- })
- .Produces