-
Couldn't load subscription status.
- Fork 716
7.0.0 RC 1 #926
-
The release candidate for .NET 7.0 is finally here. Barring any reported bugs, this should be the release. Big thanks to the early adopters that have tried things out and reported issues.
This release also contains fixes that were forward-integrated from
6.3and6.3.1.
Fixes
ASP.NET Core
- Honor the name provided in
MapApiGroupwhen usedWithOpenApi(New WithOpenApi() methods breaks ASP.NET API Versioning #920 ) - Refactor API version metadata collation (Injecting ApiVersion as a parameter in a controller action method. #922 )
- Fix regression from custom group names (Invalid ApiDescription GroupName in DocInclusionPredicate since 6.2.0 #923 )
AddProblemDetailsin example projects (now required to retain defaultProblemDetailsbehavior; new in .NET 7)
ASP.NET Core with OData
- Provide workaround for OData/ODataAspNetCore#753
Breaking Changes
There weren't any expected breaking changes, but there are some. #922 revealed that API versions were not collated as expected when building the route tree. Collation is split between Minimal APIs and traditional controllers. It is possible to have both. Previously, EndpointDataSource and IActionDescriptorCollectionProvider would have been supplied via DI. Since the ApiVersionMatcherPolicy now only depends on Microsoft.AspNetCore.Routing this was a problem.
6.3.1 subtly introduced IApiVersionMetadataCollationProvider which provides an adapter of sorts over EndpointDataSource and IActionDescriptorCollectionProvider respectively, but allows them to be independently added to DI as you add those features in. This ultimately requires changing the constructor signature of a few types:
ApiVersionMatcherPolicyDefaultApiVersionDescriptionProviderGroupedApiVersionDescriptionProvider
to add or replace their parameters with IEnumerable<IApiVersionMetadataCollationProvider>. In 6.3.1, some DI trickery was done with internal constructors to prevent breaking changes to the existing public surface area (though all the necessary extension pieces are public). Since 7.0 is still in preview, now is the time to apply this change.
Unless you are doing a lot of low-level customization or extensions, you probably won't notice these changes.
This discussion was created from the release 7.0.0 RC 1.
Beta Was this translation helpful? Give feedback.