Type mismatches between parameter and route constraints not caught #36859
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-minimal-actions
Controller-like actions for endpoint routing
feature-routing
Milestone
Uh oh!
There was an error while loading. Please reload this page.
In .NET 6, we added support for an analyzer that would detect the incompat between optionality annotations on the route constraint and parameter optionality in a minimal endpoint. See #34553 for more info.
We don't currently do anything about mismatches in the type constraints between a route and parameter, so having an endpoint like:
Will compile and build fine but sending the following request:
Will result in a 404 during the route matching phase without any warning to the user.
The text was updated successfully, but these errors were encountered: