aspnetcore/diagnostics/asp0022.md
| Value | |
|---|---|
| Rule ID | ASP0022 |
| Category | Usage |
| Fix is breaking or non-breaking | Non-breaking |
An HTTP request matches multiple routes, resulting in an ambiguous match error.
This diagnostic is emitted when a route conflict is detected.
To fix a violation of this rule, change the route's pattern, HTTP method, or route constraints.
Do not suppress a warning from this rule.
ASP0023 warns on route conflicts in ASP.NET Core MVC apps, this analyzer warns on route conflicts in Minimal API apps.
This analyzer is intentionally conservative about duplicate routes it reports to avoid false positives:
if statement aren't reported because the analyzer can't statically determine which will be used at runtime.