search and ai stabilization work, localization stablized.
This commit is contained in:
@@ -13,6 +13,7 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Scanner.WebService.Endpoints;
|
||||
|
||||
@@ -41,7 +42,7 @@ internal static class DeltaCompareEndpoints
|
||||
// POST /v1/delta/compare - Full comparison between two snapshots
|
||||
group.MapPost("/compare", HandleCompareAsync)
|
||||
.WithName("scanner.delta.compare")
|
||||
.WithDescription("Compares two scan snapshots and returns detailed delta.")
|
||||
.WithDescription(_t("scanner.delta.compare_description"))
|
||||
.Produces<DeltaCompareResponseDto>(StatusCodes.Status200OK)
|
||||
.Produces(StatusCodes.Status400BadRequest)
|
||||
.RequireAuthorization(ScannerPolicies.ScansRead);
|
||||
@@ -49,7 +50,7 @@ internal static class DeltaCompareEndpoints
|
||||
// GET /v1/delta/quick - Quick summary for header display
|
||||
group.MapGet("/quick", HandleQuickDiffAsync)
|
||||
.WithName("scanner.delta.quick")
|
||||
.WithDescription("Returns quick diff summary for Can I Ship header.")
|
||||
.WithDescription(_t("scanner.delta.quick_description"))
|
||||
.Produces<QuickDiffSummaryDto>(StatusCodes.Status200OK)
|
||||
.Produces(StatusCodes.Status400BadRequest)
|
||||
.RequireAuthorization(ScannerPolicies.ScansRead);
|
||||
@@ -57,7 +58,7 @@ internal static class DeltaCompareEndpoints
|
||||
// GET /v1/delta/{comparisonId} - Get cached comparison by ID
|
||||
group.MapGet("/{comparisonId}", HandleGetComparisonAsync)
|
||||
.WithName("scanner.delta.get")
|
||||
.WithDescription("Retrieves a cached comparison result by ID.")
|
||||
.WithDescription(_t("scanner.delta.get_description"))
|
||||
.Produces<DeltaCompareResponseDto>(StatusCodes.Status200OK)
|
||||
.Produces(StatusCodes.Status404NotFound)
|
||||
.RequireAuthorization(ScannerPolicies.ScansRead);
|
||||
@@ -77,8 +78,8 @@ internal static class DeltaCompareEndpoints
|
||||
return Results.BadRequest(new
|
||||
{
|
||||
type = "validation-error",
|
||||
title = "Invalid base digest",
|
||||
detail = "Base digest is required."
|
||||
title = _t("scanner.delta.invalid_base_digest"),
|
||||
detail = _t("scanner.delta.base_digest_required")
|
||||
});
|
||||
}
|
||||
|
||||
@@ -87,8 +88,8 @@ internal static class DeltaCompareEndpoints
|
||||
return Results.BadRequest(new
|
||||
{
|
||||
type = "validation-error",
|
||||
title = "Invalid target digest",
|
||||
detail = "Target digest is required."
|
||||
title = _t("scanner.delta.invalid_target_digest"),
|
||||
detail = _t("scanner.delta.target_digest_required")
|
||||
});
|
||||
}
|
||||
|
||||
@@ -110,8 +111,8 @@ internal static class DeltaCompareEndpoints
|
||||
return Results.BadRequest(new
|
||||
{
|
||||
type = "validation-error",
|
||||
title = "Invalid base digest",
|
||||
detail = "Base digest is required."
|
||||
title = _t("scanner.delta.invalid_base_digest"),
|
||||
detail = _t("scanner.delta.base_digest_required")
|
||||
});
|
||||
}
|
||||
|
||||
@@ -120,8 +121,8 @@ internal static class DeltaCompareEndpoints
|
||||
return Results.BadRequest(new
|
||||
{
|
||||
type = "validation-error",
|
||||
title = "Invalid target digest",
|
||||
detail = "Target digest is required."
|
||||
title = _t("scanner.delta.invalid_target_digest"),
|
||||
detail = _t("scanner.delta.target_digest_required")
|
||||
});
|
||||
}
|
||||
|
||||
@@ -142,8 +143,8 @@ internal static class DeltaCompareEndpoints
|
||||
return Results.BadRequest(new
|
||||
{
|
||||
type = "validation-error",
|
||||
title = "Invalid comparison ID",
|
||||
detail = "Comparison ID is required."
|
||||
title = _t("scanner.delta.invalid_comparison_id"),
|
||||
detail = _t("scanner.delta.comparison_id_required")
|
||||
});
|
||||
}
|
||||
|
||||
@@ -153,8 +154,8 @@ internal static class DeltaCompareEndpoints
|
||||
return Results.NotFound(new
|
||||
{
|
||||
type = "not-found",
|
||||
title = "Comparison not found",
|
||||
detail = $"Comparison with ID '{comparisonId}' was not found or has expired."
|
||||
title = _t("scanner.delta.comparison_not_found"),
|
||||
detail = _tn("scanner.delta.comparison_not_found_detail", ("comparisonId", comparisonId))
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user