Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Dec 14, 2022

Fixes #45223

Not quite finished. The remaining work:

  • Check that the map call's IEndpointConventionBuilder isn't used to add metadata that could affect routing.
  • Allow list of metadata methods that don't affect matching and still allow endpoints to be compared, e.g. RequireAuthorization.

It only works with Minimal API. Most of the infrastructure is in place to expand it to analyze controller actions in the future.

@JamesNK JamesNK added the old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Dec 14, 2022
@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Dec 14, 2022
Copy link
Member

@mitchdenny mitchdenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly a few edge cases I wouldn't have considered testing there!

@JamesNK JamesNK added the blocked The work on this issue is blocked due to some dependency label Dec 15, 2022
@JamesNK
Copy link
Member Author

JamesNK commented Dec 15, 2022

Merging blocked until API review is approved.

@JamesNK JamesNK force-pushed the jamesnk/ambiguous-route-analyzer branch from abd483a to 10be76e Compare December 20, 2022 05:41
@JamesNK JamesNK removed the blocked The work on this issue is blocked due to some dependency label Jan 6, 2023
@JamesNK
Copy link
Member Author

JamesNK commented Jan 6, 2023

API review approved, and all current feedback is applied.

Any other changes before merging?

@JamesNK JamesNK merged commit f19d4a1 into main Jan 7, 2023
@JamesNK JamesNK deleted the jamesnk/ambiguous-route-analyzer branch January 7, 2023 10:05
@ghost ghost added this to the 8.0-preview1 milestone Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Analyzer] Warn on ambiguous route patterns

6 participants