Skip to content
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

Minimal APIs naming cleanup #35570

Merged
merged 6 commits into from Aug 21, 2021
Merged

Minimal APIs naming cleanup #35570

merged 6 commits into from Aug 21, 2021

Conversation

halter73
Copy link
Member

This avoids using "Minimal" in any API names and avoids using "action" when defining minimal route handlers.

  1. MinimalActionEndpointRouteBuilderExtensions -> DelegateEndpointRouteBuilderExtensions
  2. MinimalActionEndpointConventionBuilder -> DelegateEndpointConventionBuilder
  3. Map(this IEndpointRouteBuilder endpoints, RoutePattern pattern, Delegate action) -> Map(this IEndpointRouteBuilder endpoints, RoutePattern pattern, Delegate handler)

Once this is merged, I'll backport for rc1 since this is a breaking change.

Fixes #35478

@ghost ghost added the area-runtime label Aug 20, 2021
@halter73 halter73 requested a review from pranavkm August 20, 2021 20:53
@halter73 halter73 added the api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews label Aug 20, 2021
@ghost
Copy link

ghost commented Aug 20, 2021

Thank you for your API proposal. I'm removing the api-ready-for-review label. API Proposals should be submitted for review through Issues based on this template.

@ghost ghost removed the api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews label Aug 20, 2021
Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

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

LGTM

@davidfowl
Copy link
Member

You gonna backport this?

@halter73
Copy link
Member Author

You gonna backport this?

Yep. I'm just trying to follow the proper process.

@Kahbazi
Copy link
Member

Kahbazi commented Aug 20, 2021

action -> handler ?

public static RequestDelegate Create(Delegate action, RequestDelegateFactoryOptions? options = null)

@halter73
Copy link
Member Author

Good catch @Kahbazi 👍

@Kahbazi
Copy link
Member

Kahbazi commented Aug 20, 2021

There's also some hard-coded string in analyzer.

const string MinimalActionEndpointRouteBuilderExtensions = "Microsoft.AspNetCore.Builder.MinimalActionEndpointRouteBuilderExtensions";

@JamesNK
Copy link
Member

JamesNK commented Aug 20, 2021

I don't know if it counts, but an analyzer also has minimal actions in public API:

https://github.com/dotnet/aspnetcore/blob/main/src/Framework/Analyzer/src/MinimalActions/MinimalActionAnalyzer.cs

@halter73
Copy link
Member Author

I'm not sure if it counts either, but I renamed MinimalActionAnalyzer to DelegateEndpointAnalyzer and the containing namespace from Microsoft.AspNetCore.Analyzers.MinimalActions to Microsoft.AspNetCore.Analyzers.DelegateEndpoints in the last commit.

@halter73
Copy link
Member Author

/backport to release/6.0-rc1

@github-actions
Copy link
Contributor

Started backporting to release/6.0-rc1: https://github.com/dotnet/aspnetcore/actions/runs/1152365695

@halter73 halter73 merged commit 2861521 into main Aug 21, 2021
@halter73 halter73 deleted the halter73/35478 branch August 21, 2021 02:01
@ghost ghost added this to the 7.0-preview1 milestone Aug 21, 2021
@halter73 halter73 modified the milestones: 7.0-preview1, 6.0-rc1 Oct 19, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minimal APIs naming cleanup
6 participants