Releases: Fleny113/EndpointMapper
Releases · Fleny113/EndpointMapper
v3.0.0-prerelease.1
What changed
There shouldn't be any breaking changes beside the need for .NET 9
⚠️ Now EndpointMapper requires .NET 9 and provably for the v3 stable release it will require .NET 10- Bump Source generator dependencies
- Now the Register and Configure method can be used with just the IEndpoint interface
- [perf] Now the source generator won't emit the http method arrays for option, connect, head and trace
- Using the Register method allows the ASP.NET Core Request Delegate source generator to work, so in AOT / Trimming situations this is the recommended way of configuring your endpoints
Full Changelog: v2.0.0...v3.0.0-prerelease.1
v2.0.0
v2.0.0-prerelease.4
Generate an extension method instead of intercepting the .MapEndpointMapperEndpoints call
Full Changelog: v2.0.0-prerelease.3...v2.0.0-prerelease.4
v2.0.0-prerelease.3
In the prerelease 3 the public API of EndpointMapper changed quite a bit, so here are all the changes that have
been made and you have to do to update your project.
Note
If you are updating from v1 there is one extra thing to do.The swagger support is now optional, so you need to install the
EndpointMapper.OpenApinuget package
and addusing EndpointMapper.OpenApi;for theAuthenticationRequirementOperationFilter
HttpMap<HttpVerb>(<routes>)has now been replaced withHttpMap(HttpMapMethod.<HttpVerb>, <routes>),
so aHttpMapGet("/myRoute")now isHttpMap(HttpMapMethod.Get, "/myRoute")- All your methods that have an
HttpMapattribute now needs to bestatic - The constructor based DI is no longer supported. You now need to use the DI from the method parameters
- The
Configuremethod now has only 1 overload,Configure(RouteHandlerBuilder, string route, string method) - the
IEndpointConfigurationAttributeinterface and theFilter<T>attribute have been deleted. You now need to use the method based configuration AddEndpointMapper<T>(this IServiceCollection, Action<EndpointMapperConfiguration>),
AddEndpointMapper(this IServiceCollection, Action<EndpointMapperConfiguration>, params Type[])and
AddEndpointMapper(this IServiceCollection, Action<EndpointMapperConfiguration>, params Assembly[])have been removed.UseEndpointMapper(this WebApplication, bool)has been renamed toMapEndpointMapperEndpoints(this IEndpointRouteBuilder)- You need [.NET 8 and ASP.NET Core 8][getDotnet]
- You need to enable
Interceptors[^interceptors] by adding<Features>InterceptorsPreview</Features>to your.csprojinside aPropertyGroup - You need at least C# 11, if you specify a
LangVersionthat is lower then 11 you need to bump it up - The finding of your endpoints is now done at compile time via a source generator and not a runtime using reflection. Now EndpointMapper is NativeAOT friendly.
- The
LogTimeTookToInitializeoption doesn't exist anymore - The
RoutePrefixandConfigureGroupBuilderoptions do not exist anymore. You can still configure EndpointMapper to use
a route prefix using a ASP.NET Route Group
Full Changelog: 08b4d36...v2.0.0-prerelease.3