aspnetcore
aspnetcore copied to clipboard
Update Microsoft.OpenApi to preview28
This pull request primarily updates the Microsoft.OpenApi package versions and refactors code to simplify imports and improve type usage. The most significant changes include updating dependencies, replacing outdated Microsoft.OpenApi.Models types with the new Microsoft.OpenApi namespace, and modifying public API definitions accordingly.
Dependency Updates:
- Updated
MicrosoftOpenApiVersionandMicrosoftOpenApiYamlReaderVersionfrom2.0.0-preview.18to2.0.0-preview.28ineng/Versions.props.
Refactoring Imports:
- Removed references to
Microsoft.OpenApi.Models,Microsoft.OpenApi.Models.Interfaces, andMicrosoft.OpenApi.Models.Referencesin favor of the newMicrosoft.OpenApinamespace across multiple files, includingXmlCommentGenerator.Emitter.cs,TransformersBenchmark.cs, and various transformer files in thesampledirectory. [1] [2] [3] [4] [5] [6] [7]
Code Adjustments:
- Replaced the initialization of
schema.Extensionsfrom an empty array ([]) to aDictionary<string, IOpenApiExtension>inTransformersBenchmark.cs. [1] [2]
Public API Updates:
- Updated public API definitions in
PublicAPI.Shipped.txtto reflect the transition fromMicrosoft.OpenApi.Modelstypes toMicrosoft.OpenApitypes. This includes changes to method signatures and transformer interfaces. [1] [2] [3]
Project Configuration:
- Added
<Using Include="Microsoft.OpenApi" />to theSample.csprojandMicrosoft.AspNetCore.OpenApi.csprojfiles to simplify namespace management. [1] [2]
Breaking change announcement probably needed for API changing?
Comparing main vs this PR, there's already a tonne of breaking changes via Microsoft.OpenApi in already shipped previews of 10. This is just even more churn on top of what we've had already 😅.
/backport to release/10.0-preview6
Started backporting to release/10.0-preview6: https://github.com/dotnet/aspnetcore/actions/runs/15749528712