Skip to content

Avoid duplicates in automatically generated endpoint names #36487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
captainsafia opened this issue Sep 13, 2021 · 2 comments
Closed

Avoid duplicates in automatically generated endpoint names #36487

captainsafia opened this issue Sep 13, 2021 · 2 comments
Assignees
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-minimal-actions Controller-like actions for endpoint routing old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Milestone

Comments

@captainsafia
Copy link
Member

Currently, we automatically generate an endpoint name for an endpoint based on the name of the method.

app.MapGet("/foo", Foo);

Will produce an EndpointName with a Foo method. In #36353, we added more aggressive throwing of exceptions for duplicate endpoint names.

This, in combination with the feature above, means it is more likely for features to run into the confusing error message if the duplicate endpoint name is defined in a 3rd-party library that the user cannot control.

We can resolve this by:

  • Providing an option to disable automatic endpoint generation
  • Always generating fully-qualified endpoint names
@captainsafia captainsafia added feature-minimal-actions Controller-like actions for endpoint routing old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels labels Sep 13, 2021
@BrennanConroy
Copy link
Member

Triage: We should remove the default endpoint name for now

@captainsafia
Copy link
Member Author

Revert completed.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
@amcasey amcasey added the area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc label Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-minimal-actions Controller-like actions for endpoint routing 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

No branches or pull requests

3 participants