News
.NET 10 Preview 4 Focuses on ASP.NET Core, Including OpenAPI Work
Microsoft this week shipped the fourth preview of .NET 10 without groundbreaking features but with much work devoted to ASP.NET Core & Blazor, where several work items were devoted to OpenAPI.
OpenAPI (formerly Swagger Specification) is a widely adopted open standard that provides a structured, machine-readable format (using JSON or YAML) for describing RESTful HTTP APIs, allowing both developers and computers to understand an API's endpoints, request/response formats, authentication methods, and capabilities without needing to examine the underlying code.
[Click on image for larger view.] OpenAPI (source: OpenAPI).
Microsoft development teams have been actively adopting OpenAPI tech for a while now (see the October 2024 article, "Microsoft Further Embraces OpenAPI Spec (formerly Swagger).")
In .NET 10 Preview 4, four different work items in the ASP.NET Core & Blazor section include:
-
Generate OpenAPI schemas in transformers: Adds support for custom output transformers that can programmatically modify or enrich OpenAPI schema generation, providing greater flexibility in how APIs are described and exposed.
-
Improved OpenAPI XML documentation support: Enhances the integration of XML comments into the OpenAPI document, ensuring more complete and accurate descriptions of API operations, parameters, and models.
-
Access the OpenAPI document with IOpenApiDocumentProvider: Introduces a new interface for accessing the generated OpenAPI document within the application, enabling custom logic or UI integrations based on the live API spec.
-
OpenAPI.NET updated to Preview.17: Upgrades the internal OpenAPI.NET dependency to a newer preview version, benefiting from performance improvements and extended schema compatibility.
Outside of the work done for OpenAPI, other items in the ASP.NET Core & Blazor section of Preview 4 documentation include a new high-performance JSON Patch implementation based on System.Text.Json, along with support for automatic validation of record types in Minimal APIs. JavaScript interop is enhanced with methods for calling constructors and accessing properties (InvokeNewAsync, GetValueAsync, and SetValueAsync). Blazor WebAssembly apps gain runtime diagnostics for performance profiling and memory analysis. NavigationManager now includes a NotFound method for consistent 404 handling, and redirects during static rendering no longer throw exceptions. Additional refinements include renamed APIs for clarity (HideColumnOptionsAsync, OverrideHtmlAssetPlaceholders), improved static asset preloading, updates to the Blazor WebAssembly standalone template, and support for using WebApplicationFactory with Kestrel to enable full-stack integration testing.
Meanwhile, some of the tweaks, fixes, features and functionality introduced in the new preview, using Microsoft's own categorization, include:
- Libraries:
- Out-of-Proc Trace Support for Activity Events and Links: Enables distributed tracing scenarios by supporting activity events and links out-of-process.
- Rate Limiting Trace Sampling Support: Adds support for trace sampling in rate-limited environments to improve observability.
- New async Zip APIs: Introduces asynchronous APIs for non-blocking ZIP file compression and extraction.
- Performance improvement in GZipStream for concatenated streams: Enhances performance when working with concatenated GZip streams.
- F#:
- F# language, standard library, and compiler updates: Includes new language features, standard library improvements, and compiler service enhancements.
- .NET MAUI:
- Quality improvements for .NET MAUI, .NET for Android, and .NET for iOS, Mac Catalyst, macOS, and tvOS: Various enhancements to controls, performance, and platform support.
- Windows Forms:
- Clipboard API redesign and shared implementation with WPF: Clipboard code is now unified with WPF, improving maintainability and cross-platform consistency.
- Obsoleting certain clipboard methods and new JSON serialization helpers: Moves away from
BinaryFormatter and introduces methods to help with JSON serialization of clipboard data.
- Ported UITypeEditors from .NET Framework: Adds several designer-related editors, improving
PropertyGrid and designer experience.
- Accessibility and bug fixes: Improved NVDA screen reader support and resolved issues such as DataGridView edit mode exceptions.
- Analyzer improvements: Fine-tuned existing analyzers and added new ones to reduce false positives.
- WPF:
- Performance improvements and Fluent style changes: Various optimizations and style updates for a modernized look and better performance.
- Bug fixes and quality enhancements: Addresses stability and usability issues across the framework.
- EF Core:
- LINQ enhancements, performance optimizations, and improved Azure Cosmos DB support: Improves query capabilities, efficiency, and database compatibility.
No items were listed under SDK, C# or Visual Basic.
Microsoft provides more information at:
About the Author
David Ramel is an editor and writer at Converge 360.