10.0.0 Preview 1 #1162
commonsensesoftware
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is a major release that includes new, publicly visible API changes as well as a rollup of bug fixes. This is an initial preview release that is primarily focused on improving OpenAPI integration. Additional features will come in the next preview. The wiki has not be fully updated - yet, but that will also occur in the near future.
These are preview features and changes. Please report issues if you find them. Feel free to start a discussion about the changes in the forthcoming official release.
Features
All Platforms
deprecationresponse header as defined by RFC 9745 (Support for the "Deprecation" Response Header (RFC 9745) #1128)ASP.NET Core
x-api-versioningextensionHttpClientcan now read and report on sunset and deprecation policiesExample
The following provides an example of a bare minimum setup:
The key differences from what you may be currently doing:
services.AddOpenApi( "v1" )and so on are no longer used or neededapp.MapOpenApi()has a supplemental.WithDocumentPerVersion()extension that enables multiple OpenAPI documentsIn the same way that you can configure sunset policies, you can now specify deprecation policies:
Fixes
ASP.NET Core
API Explorer
Descriptionproperty when cloning (Library breaks endpoint response metadata #1160)Breaking Changes
Breaking changes are always something to be taken seriously and should occur as infrequently as possible. When they do occur, they should occur at a clear, major version boundary. Breaking changes in the project will align to the .NET platform Long-Term Support (LTS) strategy. .NET 10 is a LTS version so now is the version to introduce these changes.
.NET 10 and C# 14 introduce extension members, which finally affords defining API Versioning extensions the way they were intended. More specifically, there are a number of extension properties that could not be written as such in the past. Extension properties enable more succinct code and express the intent where an extension method was the only option in the past. These make up the majority of the breaking changes, but unless you are an API Versioning extender or perform deep customization, you'll likely not notice any changes.
All Platforms
The introduction of deprecation polices highlighted the opportunity to genericize policy management and there is no longer a need for the sunset policy specific implementations. The function names and signatures remain the same, but the following types have been replaced:
ISunsetPolicyManager→IPolicyManager<SunsetPolicy>ISunsetPolicyBuilderExtensions→IPolicyBuilderExtensionsISunsetPolicyManagerExtensions→IPolicyManagerExtensionsASP.NET Web API
The following extension methods are now extension properties.
HttpRequestMessageGetApiVersioningOptions()→ApiVersioningOptions { get; }GetApiVersioningProperties()→ApiVersioningProperties { get; }GetRequestedApiVersion()→RequestedApiVersion { get; }HttpActionDescriptorGetApiVersionMetadata(),SetApiVersionMetadata()→ApiVersionMetadata { get; set; }HttpConfigurationGetApiVersioningOptions()→ApiVersioningOptions { get; }HttpControllerDescriptorGetApiVersionModel(),SetApiVersionModel()→ApiVersionModel { get; set; }API Explorer
The following extension methods are now extension properties.
ApiDescriptionGetApiVersion()→ApiVersion { get; }IsDeprecated()→IsDeprecated { get; }GetGroupName()→GroupName { get; }GetUniqueID()→UniqueID { get; }OData
The following extension methods are now extension properties.
IEdmModelGetApiVersion()→ApiVersion { get; }IsAdHoc()→IsAdHoc { get; }OData API Explorer
The following extension methods are now extension properties.
ApiDescriptionEdmModel()→EdmModel { get; }EntitySet()→EntitySet { get; }EntityType()→EntityType { get; }Operation()→Operation { get; }RoutePrefix()→RoutePrefix { get; }ASP.NET Core
The following extension methods are now extension properties.
HttpContextApiVersioningFeature()→ApiVersioningFeature { get; }GetRequestedApiVersion()→RequestedApiVersion { get; }MVC (Core)
The following types and members have been removed:
DefaultApiVersionGroupDescriptionProvider, which was internally identical toGroupedApiVersionDescriptionProviderpublic EndpointApiVersionMetadataCollationProvider( EndpointDataSource endpointDataSource )IServiceCollectionExtensions.EnableApiVersionBinding; it's now supported without explicit registrationThe following extension methods are now extension properties.
ActionDescriptorGetApiVersionMetadata()→ApiVersionMetadata { get; }ControllerModelGetApiVersionModel()→ApiVersionModel { get; }API Explorer
The following extension methods are now extension properties.
ApiDescriptionGetApiVersion(),SetApiVersion()→ApiVersion { get; set; }IsDeprecated()→IsDeprecated { get; }GetSunsetPolicy(),SetSunsetPolicy()→SunsetPolicy { get; set; }OData
The following extension methods are now extension properties.
IEdmModelGetApiVersion()→ApiVersion { get; }IsAdHoc()→IsAdHoc { get; }Versioned HTTP Client
The following extension methods are now extension properties.
HttpResponseMessageReadSunsetPolicy()→SunsetPolicy { get; }Contributors
deprecationheader support (Support Deprecation header #1151)This discussion was created from the release 10.0.0 Preview 1.
Beta Was this translation helpful? Give feedback.
All reactions