Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve MVC endpoint detection #35

Open
DenisPav opened this issue Apr 20, 2024 · 1 comment
Open

Improve MVC endpoint detection #35

DenisPav opened this issue Apr 20, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@DenisPav
Copy link

DenisPav commented Apr 20, 2024

Hi, I've decided to try out your package due to older one from FluentValidation being deprecated. But I've bumped into a issue where none of my validators were actually fired. I've debugged everything and noted that the IAsyncFilter that you use to wire things up is detecting the MVC endpoints based of if controller is actually ControllerBase.

My current project is using a bit of a different MVC setup where controllers are not inherited but make use of ApiController attribute and conventions as described here.

Due to that validators won't get triggered as controllers are convention based and do not inherit ControllerBase or other controller based classes that are provided out of the box.

It would be great if we can somehow support this so that this flavor of MVC controllers will trigger validators automatically also.

PS: thanks for awesome project.

@mvdgun
Copy link
Member

mvdgun commented Apr 24, 2024

Hi @DenisPav, your MVC setup sounds like a use case we should support. I don’t have a lot of time on my hands at the moment so this one is going to have to wait unfortunately. Feel free to open up a PR if you are comfortable enough.

@mvdgun mvdgun added this to the v1.5 milestone Apr 24, 2024
@mvdgun mvdgun added the enhancement New feature or request label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants