Releases: Fleny113/EndpointMapper
Releases · Fleny113/EndpointMapper
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.OpenApi
nuget 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
HttpMap
attribute now needs to bestatic
- The constructor based DI is no longer supported. You now need to use the DI from the method parameters
- The
Configure
method now has only 1 overload,Configure(RouteHandlerBuilder, string route, string method)
- the
IEndpointConfigurationAttribute
interface 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.csproj
inside aPropertyGroup
- You need at least C# 11, if you specify a
LangVersion
that 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
LogTimeTookToInitialize
option doesn't exist anymore - The
RoutePrefix
andConfigureGroupBuilder
options 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