question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MapGroup support?

See original GitHub issue

.NET 7 adds support for MapGroup, is this something that has been looked at or will be supported by this library?

I’m just starting to use FastEndpoints in a new project and I would love to be able to add pre/post-processors to endpoints for a certain group.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
dj-nitehawkcommented, Sep 11, 2022

something like this is in the works:

public class UserGroup : EndpointGroup
{
    public UserGroup()
    {
        Configure("user", ep =>
        {
            ep.AllowAnonymous();
            ep.Description(x => x.Produces(400));
        });
    }
}

public class UserRetrieve : EndpointWithoutRequest
{
    public override void Configure()
    {
        Get("/{id}");
        Group<UserGroup>();
    }
}

public class UserExists : EndpointWithoutRequest
{
    public override void Configure()
    {
        Get("exists/{id}");
        Group<UserGroup>();
    }
}

should be able to push a beta out soon…

2reactions
dj-nitehawkcommented, Oct 13, 2022

i like the idea of endpoint groups but i really don’t like their implementation. gotta spend too much brain power to read/understand the declarations. let’s see if we can do better… definitely not gonna do nested groups though… FE is for the lazy coder, but not that lazy, jeez 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

EndpointRouteBuilderExtensions.MapGroup Method
Creates a RouteGroupBuilder for defining endpoints all prefixed with the specified prefix . MapGroup(IEndpointRouteBuilder, RoutePattern). Creates a ...
Read more >
.NET 7: MapGroup support for more extension methods ...
Search code, repositories, users, issues, pull requests... · Provide feedback · Saved searches ·.NET 7: MapGroup support for more extension ...
Read more >
Map Groups Overview
The MapGroupDescription is used to identify the map group. The name should be understandable and reusable across plans and segments. The unique MapGroupGUID...
Read more >
Using MapGroup with minimal APIs in .NET 7 [duplicate]
As long as we don't want to go with the controller's approach, In Dotnet7 we can use MapGroup(), which is a static class...
Read more >
Use MapGroup For Clean Minimal API Routes #shorts
Support me on Patreon to access the source code: https://www.patreon.com/milanjovanovic Join my weekly .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found