using FluentValidation;
namespace WebTemplate.ServerAspects.Validation;
///
/// Since the FluentValidation.AspNetCore package is no longer supported and the documentation under
/// https://docs.fluentvalidation.net/en/latest/aspnet.html?highlight=asp.net%20core#using-a-filter suggests using
/// a custom filter, this is what we are doing.
///
/// The code is heavily inspired by a "coding short" video by Shawn Wildermuth but customized a bit.
/// https://www.youtube.com/watch?v=_S-r6SxLGn4
///
/// The object type that should be validated.
public class ValidationFilter : IEndpointFilter
{
public async ValueTask