Open captainsafia opened 3 years ago
Thanks for contacting us.
We're moving this issue to the .NET 8 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
@JamesNK Is this something the new routing tooling addresses?
It doesn't right now. But the route tooling infrastructure should make this analyzer quick to write:
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 https://github.com/dotnet/aspnetcore/issues/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.