proudmonkey / AutoWrapper

A simple, yet customizable global exception handler and Http response wrapper for ASP.NET Core APIs.
MIT License
679 stars 82 forks source link

Dynamic Api Version per endpoint possible? #84

Open abelfiore opened 3 years ago

abelfiore commented 3 years ago

Would it be possible to enhance AutoWrapper to dynamically show the Api Version of each endpoint (they can all theoretically be different)? I'm assuming the ApiVersion option is currently a static global version for the entire api.

proudmonkey commented 3 years ago

The ApiResponse object has an overload that allows you to pass in the API version. Have you tried that?

abelfiore commented 3 years ago

Yes, I saw that, but was wondering if AutoWrapper could support a way to do this without explicitly doing anything in the controller endpoints. In other words, detect the api version of the method executing.