Open wonea opened 2 years ago
I like to work in my vacations fo free... Right now I am doing migration to FV11
It's cool, thanks for your hard work. I've worked around it for now.
Please check 6.0.0-beta.1
services.TryAddTransient<IValidatorFactory, ServiceProviderValidatorFactory>();
hi @wonea , im also having the same problem. im using asp co6 6. whats the work around you are using?
That quoted line works fine. Just suppress or ignore the obsolete warnings. Or update to version 6.0.0-beta.1 of this NuGet package.
yes it worked. but then i updated the fluent validation to the latest version and now again the swagger UI does not show the required fields. any possible help please
That quoted line works fine. Just suppress or ignore the obsolete warnings. Or update to version 6.0.0-beta.1 of this NuGet package.
yes it worked. but then i updated the fluent validation to the latest version and now again the swagger UI does not show the required fields. any possible help please
At the moment and I'm using the following
I'll update those dependencies when my project constraints allow.
Those action filter approach is a much better way of working, it allows better debug access rather than using automatic validation from the non-async AspNet validation request pipeline.
What's the status on this? I'm currently trying to use this package in my minimal api project that uses Manual validation, but the attributes don't seem to be getting added to swagger (Using 6.0.0-beta.3)
Here is minimal API example: https://github.com/micro-elements/MicroElements.Swashbuckle.FluentValidation/tree/master/samples/MinimalApi @EniacMlezi Please provide example of your project, maybe some repro
Finally had time again today to check this out. Making a repro I found out 6.0.0-beta.3 did indeed work for me, validations got when using Manual validation (not using FluentValidation.AspNetCore package). My problem was with nested property validations not showing up in swagger, making it look like it didn't work.
I'll be making a different issue for my nested validations problem.
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 https://github.com/FluentValidation/FluentValidation/issues/1961
Add validators to the service collection
I can get the annotations working using the following line, however now I get deprecation warnings in my code