-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Mvc.Api.Analyzers not recognizing methods from a Base Class #4410
Comments
The analyzer uses the same behavior as runtime to determine if something's a controller. For instance, generic types or abstract types aren't considered controllers. While this is true at runtime, it clearly doesn't work very well for inherited types like yours. We should consider relaxing this restriction. |
Just to add a note to this @mkArtakMSFT The same issue occurs when using local functions or Func in the controller action. Would be nice if the analyzer check was recursive in the controller action path. |
Thanks for contacting us. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Thanks for contacting us. We're moving this issue to the |
Thanks for contacting us. We're moving this issue to the |
My app use a Base Controller to reuse some methods inside my Api controllers.

The MVC.API.Analyzer library is looking at my controllers that inherit from this base controller, trying to found undocumented reponse codes. That is correct.
But, inside my Base Controller, I have undocument methods. The swagger UI shows me correctly all the inherited methods, but the analyzers could not point me that I am missing something.
The Controller that inherits from BaseController and its swagger doc. Correct.

The Base Controller. Wrong. (Im missing documentation for NotFound and BadRequest)

Any help on that??
The text was updated successfully, but these errors were encountered: