diff --git a/BannedSymbols.txt b/BannedSymbols.txt index b842337..a3df73e 100644 --- a/BannedSymbols.txt +++ b/BannedSymbols.txt @@ -23,6 +23,14 @@ M:System.Threading.Tasks.Task.WaitAll;Use Task.WhenAll with await. M:System.Threading.Tasks.Task.WaitAny;Use Task.WhenAny with await. M:System.Threading.Tasks.Task.GetAwaiter;Await the task directly rather than blocking on the awaiter. +## Request validation — FluentValidation arrives transitively with FastEndpoints and is +## deliberately unused. A validator short-circuits before the handler and answers with +## FastEndpoints' own envelope, which carries no ProblemDetails `code` — and the code is the only +## part of an error the client branches on. Validation lives in the feature services, where it can +## throw an exception the endpoint maps to a coded problem. See docs/adr/0008-fastendpoints.md. +T:FastEndpoints.Validator`1;Validate in the feature service and map its exception to a coded problem; a Validator answers with FastEndpoints' envelope, which has no `code`. +T:FluentValidation.AbstractValidator`1;As above. FluentValidation is a transitive dependency of FastEndpoints, not a chosen one. + ## Encoding — must be explicit, never the ambient codepage. P:System.Text.Encoding.Default;Specify the encoding explicitly; Encoding.Default varies by platform. diff --git a/Directory.Packages.props b/Directory.Packages.props index ff9358b..06507cb 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -16,6 +16,19 @@ + + + + +