You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have an action [HttpGet("{id}")], and [MapToApiVersion("1.5")], then that method will be invoked instead of another method with a different route.
For the controller below, if I invoke http://localhost:5167/v1.5/Message/Test, then the Id method instead is run. If I remove the MapToApiVersion attribute, then it behaves as expected.
Confirmed; this is a bug. The issue is that explicit version matches are considered over implicit versions (match or map) without considering the score of the match. The Id route overlaps with Get, but Get has a lower score (e.g. it's a better match). Get isn't being resolved because it is an implicit version match (e.g. no explicit mapping).
This will be fixed in 6.1 which should be this week. You can work around the issue by explicitly mapping versions to Get.
If I have an action [HttpGet("{id}")], and [MapToApiVersion("1.5")], then that method will be invoked instead of another method with a different route.
For the controller below, if I invoke http://localhost:5167/v1.5/Message/Test, then the Id method instead is run. If I remove the MapToApiVersion attribute, then it behaves as expected.
The text was updated successfully, but these errors were encountered: