Files
T
kjh2064 c41e5063b7 chore: remove kbx-foundation-v36 reference (superseded by v4 implementation)
Removed entire kbx-foundation-v36 directory as it's been replaced by
the new KBX Foundation v4 patterns implemented in this session:
- Registry-driven screen definitions
- Density-aware UI adapter components
- Feature module templates (ShadowRun, Models)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-12 01:39:58 +09:00

24 lines
798 B
C#

using FastEndpoints;
namespace Shared.Problems;
public static class KbxFastEndpoints
{
public static void ConfigureErrors(Config config)
{
config.Errors.ProducesMetadataType = typeof(KbxValidationProblem);
config.Errors.ResponseBuilder = (failures, _, _) =>
KbxValidationProblem.Create(failures.Select(f => new KbxValidationError(
Field: ToCamelCase(f.PropertyName),
RowKey: null,
Code: string.IsNullOrWhiteSpace(f.ErrorCode) ? "VALIDATION_ERROR" : f.ErrorCode,
Message: f.ErrorMessage)).ToArray());
}
private static string? ToCamelCase(string? value)
{
if (string.IsNullOrWhiteSpace(value)) return value;
return char.ToLowerInvariant(value[0]) + value[1..];
}
}