Removed support to apply endpoint conventions globally
mikeolasz opened this issue · 2 comments
With this change the return type MapCarter was changed and it's no longer IEndpointConventionBuilder. It would have been really nice to put RequireAuthorization on all endpoints.
The discussion here introduced a nice solution and it's partly removed now. Is there any chance it's gonna be reintroduced or updated?
Currently I don't see any way to apply conventions for multiple endpoints only one-by-one. Could you suggest a solution for this?
You can do it at the module level. (although its commented out here) https://github.com/CarterCommunity/Carter/blob/main/samples/CarterSample/Features/Directors/DirectorsModule.cs#L10
That's unfortunate. It would've been really nice if you could use it similarly to ASP.NET Core's MapControllers etc. Thanks!