Skip to content

Add TBuilder overloads to WithTags and others #41830

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

Merged
merged 3 commits into from
Jun 6, 2022
Merged

Add TBuilder overloads to WithTags and others #41830

merged 3 commits into from
Jun 6, 2022

Conversation

halter73
Copy link
Member

var todoGroup = app.MapGroup("/todos");
todoGroup.WithTags("todos");
todoGroup.WithSummary("An endpoint for managing todos.");

todoGroup.MapGet("/", (TodoDb db) => TypedResults.Ok(await db.Todos.ToArrayAsync()));
todoGroup.MapPost("/todos", (Todo todo, TodoDb db) =>
{
    // ....

Fixes #41428

@halter73 halter73 requested review from captainsafia and a team May 25, 2022 03:16
@ghost ghost added the area-runtime label May 25, 2022
Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

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

LGTM, so far! I believe we also want to update WithOpenApi here.

@halter73
Copy link
Member Author

halter73 commented May 25, 2022

I believe we also want to update WithOpenApi here.

I really wanted to update WithOpenApi in this PR, but that's a whole other can of worms. It has similar issues as AddFilter because it tries to fish MethodInfo out of the existing Metadata which may not exist yet if WithOpenApi is called on a group. That will have to be a follow up.

@halter73 halter73 changed the title Add overloads to WithTags and others targeting IEndpointConventionBuilder Add TBuilder overloads to WithTags and others Jun 1, 2022
@halter73 halter73 enabled auto-merge (squash) June 1, 2022 01:59
@halter73 halter73 merged commit 26df7df into main Jun 6, 2022
@halter73 halter73 deleted the halter73/41428 branch June 6, 2022 21:44
@ghost ghost added this to the 7.0-preview6 milestone Jun 6, 2022
captainsafia pushed a commit to captainsafia/aspnetcore that referenced this pull request Jun 13, 2022
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 25, 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.

[Route Groups] WithTags et al. should target IEndpointConventionBuilder
4 participants