-
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Hi, I'm currently moving an API from FluentValidation 10 to 11, removing automatic validation and doing manual validation via an IAsyncActionFilter. This is because there is quite a lot of async validation throughout the API.
The IAsyncActionFilter is working well however MicroElements.Swashbuckle.FluentValidation is no longer decorating the Swagger pages with validation. How can I configure MicroElements.Swashbuckle.FluentValidation to work with the service provider.
https://docs.fluentvalidation.net/en/latest/aspnet.html
FluentValidation/FluentValidation#1961
Add validators to the service collection
services.AddValidatorsFromAssemblies(typeof(MyClass).Assembly);
I can get the annotations working using the following line, however now I get deprecation warnings in my code
services.TryAddTransient<IValidatorFactory, ServiceProviderValidatorFactory>();
Metadata
Metadata
Assignees
Labels
No labels