diff --git a/.github/workflows/blazor-hybrid-issue-processing.yml b/.github/workflows/blazor-hybrid-issue-processing.yml index b1f182c70c9a..5f46876d906a 100644 --- a/.github/workflows/blazor-hybrid-issue-processing.yml +++ b/.github/workflows/blazor-hybrid-issue-processing.yml @@ -5,7 +5,7 @@ on: - opened jobs: process-blazor-issue: - if: contains(github.event.issue.body, 'aspnet/core/blazor/hybrid') + if: contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/hybrid') runs-on: ubuntu-latest permissions: issues: write diff --git a/.github/workflows/blazor-issue-processing.yml b/.github/workflows/blazor-issue-processing.yml index 11c2bae47f35..28ddc0351ad7 100644 --- a/.github/workflows/blazor-issue-processing.yml +++ b/.github/workflows/blazor-issue-processing.yml @@ -5,12 +5,12 @@ on: - opened jobs: process-blazor-issue: - if: (contains(github.event.issue.body, 'aspnet/core/blazor') - && !contains(github.event.issue.body, 'aspnet/core/blazor/hybrid')) - || contains(github.event.issue.body, 'client-side/dotnet-interop/index.md') - || contains(github.event.issue.body, 'client-side/dotnet-interop/wasm-browser-app.md') - || contains(github.event.issue.body, 'mvc/views/tag-helpers/built-in/component-tag-helper.md') - || contains(github.event.issue.body, 'mvc/views/tag-helpers/built-in/persist-component-state.md') + if: (contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor') + && !contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/hybrid')) + || contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/client-side/dotnet-interop/index.md') + || contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/client-side/dotnet-interop/wasm-browser-app.md') + || contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/mvc/views/tag-helpers/built-in/component-tag-helper.md') + || contains(github.event.issue.body, 'https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/mvc/views/tag-helpers/built-in/persist-component-state.md') runs-on: ubuntu-latest permissions: issues: write diff --git a/aspnetcore/blazor/file-downloads.md b/aspnetcore/blazor/file-downloads.md index e36a0e004eec..a55425f3353b 100644 --- a/aspnetcore/blazor/file-downloads.md +++ b/aspnetcore/blazor/file-downloads.md @@ -20,7 +20,7 @@ Files can be downloaded from the app's own static assets or from any other locat :::moniker range=">= aspnetcore-9.0" -* ASP.NET Core apps use Map Static Assets Middleware or Static File Middleware to serve files to clients of server-side apps. For more information, see . +* ASP.NET Core apps use Map Static Assets routing endpoint conventions or Static File Middleware to serve files to clients of server-side apps. For more information, see . * The guidance in this article also applies to other types of file servers that don't use .NET, such as Content Delivery Networks (CDNs). :::moniker-end diff --git a/aspnetcore/blazor/fundamentals/static-files.md b/aspnetcore/blazor/fundamentals/static-files.md index 6eab79935e3f..aa581810b04d 100644 --- a/aspnetcore/blazor/fundamentals/static-files.md +++ b/aspnetcore/blazor/fundamentals/static-files.md @@ -14,20 +14,18 @@ uid: blazor/fundamentals/static-files This article describes Blazor app configuration for serving static files. -## Static asset middleware - -*This section applies to server-side Blazor apps.* +## Static asset delivery in server-side Blazor apps :::moniker range=">= aspnetcore-9.0" -Serving static assets is managed by either of the two middlewares described in the following table. +Serving static assets is managed by either routing endpoint conventions or a middleware described in the following table. -Middleware | API | .NET Version | Description +Feature | API | .NET Version | Description --- | --- | :---: | --- -Map Static Assets | | .NET 9 or later | Optimizes the delivery of static assets to clients. -Static Files | | All .NET versions | Serves static assets to clients without the optimizations of Map Static Assets Middleware but useful for some tasks that Map Static Assets Middleware isn't capable of managing. +Map Static Assets routing endpoint conventions | | .NET 9 or later | Optimizes the delivery of static assets to clients. +Static Files Middleware | | All .NET versions | Serves static assets to clients without the optimizations of Map Static Assets but useful for some tasks that Map Static Assets isn't capable of managing. -Configure Map Static Assets Middleware by calling in the app's request processing pipeline, which performs the following: +Configure Map Static Assets by calling in the app's request processing pipeline, which performs the following: * Sets the [ETag](https://developer.mozilla.org/docs/Web/HTTP/Headers/ETag) and [Last-Modified](https://developer.mozilla.org/docs/Web/HTTP/Headers/Last-Modified) headers. * Sets [caching headers](https://developer.mozilla.org/docs/Web/HTTP/Headers/Cache-Control). @@ -36,13 +34,13 @@ Configure Map Static Assets Middleware by calling in most situations. However, Map Static Assets Middleware is optimized for serving the assets from known locations in the app at build and publish time. If the app serves assets from other locations, such as disk or embedded resources, should be used. +Map Static Assets can replace in most situations. However, Map Static Assets is optimized for serving the assets from known locations in the app at build and publish time. If the app serves assets from other locations, such as disk or embedded resources, should be used. -Map Static Assets Middleware () replaces calling in apps that serve Blazor WebAssembly framework files, and explicitly calling in a Blazor Web App isn't necessary because the API is automatically called when invoking . +Map Static Assets () replaces calling in apps that serve Blazor WebAssembly framework files, and explicitly calling in a Blazor Web App isn't necessary because the API is automatically called when invoking . -Map Static Assets Middleware provides the following benefits that aren't available when calling : +Map Static Assets provides the following benefits that aren't available when calling : * Build-time compression for all the assets in the app, including JavaScript (JS) and stylesheets but excluding image and font assets that are already compressed. [Gzip](https://tools.ietf.org/html/rfc1952) (`Content-Encoding: gz`) compression is used during development. Gzip with [Brotli](https://tools.ietf.org/html/rfc7932) (`Content-Encoding: br`) compression is used during publish. * [Fingerprinting](https://developer.mozilla.org/docs/Glossary/Fingerprinting) for all assets at build time with a [Base64](https://developer.mozilla.org/docs/Glossary/Base64)-encoded string of the [SHA-256](xref:System.Security.Cryptography.SHA256) hash of each file's content. This prevents reusing an old version of a file, even if the old file is cached. Fingerprinted assets are cached using the [`immutable` directive](https://developer.mozilla.org/docs/Web/HTTP/Headers/Cache-Control#directives), which results in the browser never requesting the asset again until it changes. For browsers that don't support the `immutable` directive, a [`max-age` directive](https://developer.mozilla.org/docs/Web/HTTP/Headers/Cache-Control#directives) is added. @@ -61,40 +59,40 @@ When [Interactive WebAssembly or Interactive Auto render modes](xref:blazor/fund * During WebAssembly boot, Blazor retrieves the URL, imports the module, and calls a function to retrieve the asset collection and reconstruct it in memory. The URL is specific to the content and cached forever, so this overhead cost is only paid once per user until the app is updated. * The resource collection is also exposed at a human-readable URL (`_framework/resource-collection.js`), so JS has access to the resource collection for [enhanced navigation](xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling) or to implement features of other frameworks and third-party components. -Map Static Assets Middleware doesn't provide features for minification or other file transformations. Minification is usually handled by custom code or [third-party tooling](xref:blazor/fundamentals/index#community-links-to-blazor-resources). +Map Static Assets doesn't provide features for minification or other file transformations. Minification is usually handled by custom code or [third-party tooling](xref:blazor/fundamentals/index#community-links-to-blazor-resources). -Static File Middleware () is useful in the following situations that Map Static Assets Middleware () can't handle: +Static File Middleware () is useful in the following situations that Map Static Assets () can't handle: * Applying a path prefix to Blazor WebAssembly static asset files, which is covered in the [Prefix for Blazor WebAssembly assets](#prefix-for-blazor-webassembly-assets) section. * Configuring file mappings of extensions to specific content types and setting static file options, which is covered in the [File mappings and static file options](#file-mappings-and-static-file-options) section. For more information, see . -## Consume assets with Map Static File Middleware +## Deliver assets with Map Static Assets routing endpoint conventions *This section applies to server-side Blazor apps.* -Assets are consumed via the `ComponentBase.Assets` property, which resolves the fingerprinted URL for a given asset. In the following example, Bootstrap, the Blazor project template app stylesheet (`app.css`), and the [CSS isolation stylesheet](xref:blazor/components/css-isolation) are linked in a root component, typically the `App` component (`Components/App.razor`): +Assets are delivered via the property, which resolves the fingerprinted URL for a given asset. In the following example, Bootstrap, the Blazor project template app stylesheet (`app.css`), and the [CSS isolation stylesheet](xref:blazor/components/css-isolation) (based on an app's namespace of `BlazorSample`) are linked in a root component, typically the `App` component (`Components/App.razor`): ```razor - + ``` ## Import maps *This section applies to server-side Blazor apps.* -The `ImportMap` component represents an import map element (``) that defines the import map for module scripts. The `ImportMap` component is placed in `` content of the root component, typically the `App` component (`Components/App.razor`). +The Import Map component () represents an import map element (``) that defines the import map for module scripts. The Import Map component is placed in `` content of the root component, typically the `App` component (`Components/App.razor`). ```razor ``` -If a custom `ImportMapDefinition` isn't assigned to an `ImportMap` component, the import map is generated based on the app's assets. +If a custom isn't assigned to an Import Map component, the import map is generated based on the app's assets. The following examples demonstrate custom import map definitions and the import maps that they create. @@ -175,9 +173,9 @@ The preceding code results in the following import map: } ``` -Combine import map definitions (`ImportMapDefinition`) with `ImportMapDefinition.Combine`. +Combine import map definitions () with . -Import map created from a `ResourceAssetCollection` that maps static assets to their corresponding unique URLs: +Import map created from a that maps static assets to their corresponding unique URLs: ```csharp ImportMapDefinition.FromResourceCollection( diff --git a/aspnetcore/blazor/tutorials/movie-database-app/part-1.md b/aspnetcore/blazor/tutorials/movie-database-app/part-1.md index f809bbbbf711..591dedf6ac40 100644 --- a/aspnetcore/blazor/tutorials/movie-database-app/part-1.md +++ b/aspnetcore/blazor/tutorials/movie-database-app/part-1.md @@ -331,7 +331,7 @@ app.UseAntiforgery(); :::moniker range=">= aspnetcore-9.0" -Map Static Assets Middleware () maps static files, such as images, scripts, and stylesheets, produced during the build as endpoints: +Map Static Assets routing endpoint conventions () maps static files, such as images, scripts, and stylesheets, produced during the build as endpoints: ```csharp app.MapStaticAssets(); diff --git a/aspnetcore/fundamentals/static-files.md b/aspnetcore/fundamentals/static-files.md index 66c685bf8d01..79a0f98ecfbe 100644 --- a/aspnetcore/fundamentals/static-files.md +++ b/aspnetcore/fundamentals/static-files.md @@ -49,14 +49,14 @@ Creating performant web apps requires optimizing asset delivery to the browser. * Use a [CDN](/microsoft-365/enterprise/content-delivery-networks?view=o365-worldwide&preserve-view=true) to serve the assets closer to the user. * Minimize the size of assets served to the browser. This optimization doesn't include minification. -[`MapStaticAssets`](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) is a middleware that helps optimize the delivery of static assets in an app. It's designed to work with all UI frameworks, including Blazor, Razor Pages, and MVC. + are routing endpoint conventions that optimize the delivery of static assets in an app. It's designed to work with all UI frameworks, including Blazor, Razor Pages, and MVC. [`UseStaticFiles`](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles) also serves static files, but it doesn't provide the same level of optimization as `MapStaticAssets`. For a comparison of `UseStaticFiles` and `MapStaticAssets`, see [Optimizing static web asset delivery ](xref:aspnetcore-9#optimizing-static-web-asset-delivery). ### Serve files in web root -The default web app templates call the [`MapStaticAssets`](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) method in `Program.cs`, which enables static files to be served: +The default web app templates call the method in `Program.cs`, which enables static files to be served: [!code-csharp[](~/fundamentals/static-files/samples/9.x/StaticFilesSample/Program.cs?name=snippet&highlight=15)] @@ -102,7 +102,7 @@ The preceding code makes static files publicly available in the local cache for ## Static file authorization -The ASP.NET Core templates call [`MapStaticAssets`](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) before calling . Most apps follow this pattern. When the Static File Middleware is called before the authorization middleware: +The ASP.NET Core templates call before calling . Most apps follow this pattern. When the Static File Middleware is called before the authorization middleware: * No authorization checks are performed on the static files. * Static files served by the Static File Middleware, such as those under `wwwroot`, are publicly accessible. diff --git a/aspnetcore/migration/80-90.md b/aspnetcore/migration/80-90.md index a32a5682b719..d2f2fd7ce4ff 100644 --- a/aspnetcore/migration/80-90.md +++ b/aspnetcore/migration/80-90.md @@ -70,20 +70,39 @@ In the project file, update each [`Microsoft.AspNetCore.*`](https://www.nuget.or ``` -## Replace UseStaticFiles with MapStaticAssets +## Replace `UseStaticFiles` with `MapStaticAssets` -Blazor has different update instructions for `MapStaticAssets` than Razor Pages and ASP.NET Core MVC. +Blazor has different update instructions for implementing Map Static Assets routing endpoint conventions than ASP.NET Core Razor Pages and MVC. -### Blazor web apps +### Blazor Web App implementation -* Replace [UseStaticFiles](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles) with [MapStaticAssets](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) in `Program.cs` -* Update explicit references to static assets in `.razor` files to use the `@Assets["asset-path"]` API. This should ***NOT*** be done for the Blazor framework scripts (`*blazor.\*.js*`). -* Update the root `App.razor` component to include the `` component in the head. +* Replace with in the app's `Program` file: -### Razor Pages and ASP.NET Core MVC based apps + ```diff + - app.UseStaticFiles(); + + app.MapStaticAssets(); + ``` -* Replace [UseStaticFiles](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles) with [MapStaticAssets](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) in `Program.cs` -* Chain a call to `.WithStaticAssets` after `MapRazorPages` or `MapControllerRoute` in `Program.cs`. For an example, see the +* Assets are delivered via the property, which resolves the fingerprinted URL for a given asset. Update explicit references to static assets in Razor component files (`.razor`) to use `@Assets["{ASSET PATH}"]`, where the `{ASSET PATH}` placeholder is the path to the asset. This should ***NOT*** be done for the Blazor framework scripts (`blazor.*.js`). In the following example, Bootstrap, the Blazor project template app stylesheet (`app.css`), and the [CSS isolation stylesheet](xref:blazor/components/css-isolation) (based on an app's namespace of `BlazorSample`) are linked in a root component, typically the `App` component (`Components/App.razor`): + + ```razor + + + + ``` + +* Add the Import Map component () to the `` content of the app's root component, typically the `App` component (`App.razor`): + + ```razor + + ``` + +For more information, see . + +### ASP.NET Core Razor Pages and MVC implementation + +* Replace with in `Program.cs`. +* Chain a call to `.WithStaticAssets` after `MapRazorPages` or `MapControllerRoute` in `Program.cs`. For an example, see the . * Add `` to the head of the main layout file. ## Blazor diff --git a/aspnetcore/performance/caching/output/samples/7.x/Program.cs b/aspnetcore/performance/caching/output/samples/7.x/Program.cs index f49348cb6c6e..5d14963fd5a3 100644 --- a/aspnetcore/performance/caching/output/samples/7.x/Program.cs +++ b/aspnetcore/performance/caching/output/samples/7.x/Program.cs @@ -59,7 +59,7 @@ public static void Main(string[] args) // builder.Services.AddOutputCache(options => { - options.AddBasePolicy(builder => + options.AddPolicy("CachePost", builder => builder.AddPolicy(), true); }); // diff --git a/aspnetcore/release-notes/aspnetcore-9.0.md b/aspnetcore/release-notes/aspnetcore-9.0.md index d242fff2c94b..db22f8b3a893 100644 --- a/aspnetcore/release-notes/aspnetcore-9.0.md +++ b/aspnetcore/release-notes/aspnetcore-9.0.md @@ -45,14 +45,8 @@ This section describes new features for OpenAPI [!INCLUDE[](~/release-notes/aspnetcore-9/includes/openApi.md)] -[!INCLUDE[](~/release-notes/aspnetcore-9/includes/openAPI_completion.md)] - -[!INCLUDE[](~/release-notes/aspnetcore-9/includes/transformer-registration.md)] - [!INCLUDE[](~/release-notes/aspnetcore-9/includes/openapi-aot.md)] -[!INCLUDE[](~/release-notes/aspnetcore-9/includes/prob_validation.md)] - ## Authentication and authorization This section describes new features for authentication and authorization. diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-9/includes/blazor.md index ebe19d8ee6e8..20c40985fa98 100644 --- a/aspnetcore/release-notes/aspnetcore-9/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-9/includes/blazor.md @@ -30,12 +30,12 @@ For more information, see ) is a new feature that helps optimize the delivery of static assets in any ASP.NET Core app, including Blazor apps. -For more information, see either of the following resources: +For more information, see the following resources: -* The [Optimizing static web asset delivery](#optimizing-static-web-asset-delivery) section of this article. -* . +* The [Optimize static web asset delivery](#optimize-static-web-asset-delivery) section of this article. +* . ### Detect rendering location, interactivity, and assigned render mode at runtime diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/openApi.md b/aspnetcore/release-notes/aspnetcore-9/includes/openApi.md index e487b4a439ce..a41d7c5582f5 100644 --- a/aspnetcore/release-notes/aspnetcore-9/includes/openApi.md +++ b/aspnetcore/release-notes/aspnetcore-9/includes/openApi.md @@ -1,6 +1,6 @@ ### Built-in support for OpenAPI document generation -The [OpenAPI specification](https://www.openapis.org/) is a standard for describing HTTP APIs. The standard allows developers to define the shape of APIs that can be plugged into client generators, server generators, testing tools, documentation, and more. In .NET 9 Preview, ASP.NET Core provides built-in support for generating OpenAPI documents representing controller-based or minimal APIs via the [Microsoft.AspNetCore.OpenApi](https://nuget.org/packages/Microsoft.AspNetCore.OpenApi) package. +The [OpenAPI specification](https://www.openapis.org/) is a standard for describing HTTP APIs. The standard allows developers to define the shape of APIs that can be plugged into client generators, server generators, testing tools, documentation, and more. In .NET 9, ASP.NET Core provides built-in support for generating OpenAPI documents representing controller-based or minimal APIs via the [Microsoft.AspNetCore.OpenApi](https://nuget.org/packages/Microsoft.AspNetCore.OpenApi) package. The following highlighted code calls: @@ -25,14 +25,14 @@ OpenAPI documents can also be generated at build-time by adding the [`Microsoft. dotnet add package Microsoft.Extensions.ApiDescription.Server --prerelease ``` -In the app's project file, add the following: +To modify the location of the emitted OpenAPI documents, set the target path in the OpenApiDocumentsDirectory property in the app's project file: -:::code language="xml" source="~/release-notes/aspnetcore-9/samples/OpenApiExample/OpenApiExample.csproj" range="9-12"::: +:::code language="xml" source="~/release-notes/aspnetcore-9/samples/OpenApiExample/OpenApiExample.csproj" range="9-11"::: Run `dotnet build` and inspect the generated JSON file in the project directory. ![OpenAPI document generation at build-time](~/release-notes/aspnetcore-9/_static/openapidoc2.png) -ASP.NET Core's built-in OpenAPI document generation provides support for various customizations and options. It provides document and operation transformers and has the ability to manage multiple OpenAPI documents for the same application. +ASP.NET Core's built-in OpenAPI document generation provides support for various customizations and options. It provides document, operation, and schema transformers and has the ability to manage multiple OpenAPI documents for the same application. To learn more about ASP.NET Core's new OpenAPI document capabilities, see [the new Microsoft.AspNetCore.OpenApi docs](https://aka.ms/aspnet/openapi). diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/prob_validation.md b/aspnetcore/release-notes/aspnetcore-9/includes/prob_validation.md deleted file mode 100644 index 9dd411782720..000000000000 --- a/aspnetcore/release-notes/aspnetcore-9/includes/prob_validation.md +++ /dev/null @@ -1,13 +0,0 @@ -### Support calling `ProducesProblem` and `ProducesValidationProblem` on route groups - -The [ProducesProblem](/dotnet/api/microsoft.aspnetcore.http.openapiroutehandlerbuilderextensions.producesproblem) and [ProducesValidationProblem](/dotnet/api/microsoft.aspnetcore.http.openapiroutehandlerbuilderextensions.producesvalidationproblem) extension methods have been updated for route groups. These methods can be used to indicate that all endpoints in a route group can return `ProblemDetails` or `ValidationProblemDetails` responses for the purposes of OpenAPI metadata. - -:::code language="csharp" source="~/fundamentals/openapi/samples/9.x/ProducesProblem/Program.cs" id="snippet_1" ::: - -### `Problem` and `ValidationProblem` result types support construction with `IEnumerable>` values - -Prior to .NET 9, constructing [Problem](/dotnet/api/microsoft.aspnetcore.http.typedresults.problem) and [ValidationProblem](/dotnet/api/microsoft.aspnetcore.http.typedresults.validationproblem) result types in minimal APIs required that the `errors` and `extensions` properties be initialized with an implementation of `IDictionary`. In this release, these construction APIs support overloads that consume `IEnumerable>`. - -:::code language="csharp" source="~/fundamentals/openapi/samples/9.x/ProducesProblem/Program.cs" id="snippet_2" ::: - -Thanks to GitHub user [joegoldman2](https://github.com/joegoldman2) for this contribution! diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/produces-problem.md b/aspnetcore/release-notes/aspnetcore-9/includes/produces-problem.md index 7eeaf2a1ca20..376a55181997 100644 --- a/aspnetcore/release-notes/aspnetcore-9/includes/produces-problem.md +++ b/aspnetcore/release-notes/aspnetcore-9/includes/produces-problem.md @@ -15,3 +15,11 @@ app.Run(); record Todo(int Id, string Title, boolean IsCompleted); ``` + +### `Problem` and `ValidationProblem` result types support construction with `IEnumerable>` values + +Prior to .NET 9, constructing [Problem](/dotnet/api/microsoft.aspnetcore.http.typedresults.problem) and [ValidationProblem](/dotnet/api/microsoft.aspnetcore.http.typedresults.validationproblem) result types in minimal APIs required that the `errors` and `extensions` properties be initialized with an implementation of `IDictionary`. In this release, these construction APIs support overloads that consume `IEnumerable>`. + +:::code language="csharp" source="~/fundamentals/openapi/samples/9.x/ProducesProblem/Program.cs" id="snippet_2" ::: + +Thanks to GitHub user [joegoldman2](https://github.com/joegoldman2) for this contribution! diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/transformer-registration.md b/aspnetcore/release-notes/aspnetcore-9/includes/transformer-registration.md deleted file mode 100644 index 5b06ecc63fbb..000000000000 --- a/aspnetcore/release-notes/aspnetcore-9/includes/transformer-registration.md +++ /dev/null @@ -1,29 +0,0 @@ -### Improvements to transformer registration APIs in Microsoft.AspNetCore.OpenApi - -OpenAPI transformers support modifying the OpenAPI document, operations within the document, or schemas associated with types in the API. The APIs for registering transformers on an OpenAPI document provide a variety of options for registering transformers. - -Previously, the following APIs were available for registering transformers: - -```csharp -OpenApiOptions AddDocumentTransformer(Func transformer) -OpenApiOptions AddDocumentTransformer(IOpenApiDocumentTransformer transformer) -OpenApiOptions AddDocumentTransformer() -OpenApiOptions UseSchemaTransformer(Func) -OpenApiOptions AddOperationTransformer(Func) -``` - -The new API set is as follows: - -```csharp -OpenApiOptions AddDocumentTransformer(Func transformer) -OpenApiOptions AddDocumentTransformer(IOpenApiDocumentTransformer transformer) -OpenApiOptions AddDocumentTransformer() - -OpenApiOptions AddSchemaTransformer(Func transformer) -OpenApiOptions AddSchemaTransformer(IOpenApiSchemaTransformer transformer) -OpenApiOptions AddSchemaTransformer() - -OpenApiOptions AddOperationTransformer(Func transformer) -OpenApiOptions AddOperationTransformer(IOpenApiOperationTransformer transformer) -OpenApiOptions AddOperationTransformer() -``` diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/web_asset_delivery.md b/aspnetcore/release-notes/aspnetcore-9/includes/web_asset_delivery.md index 69636d34ed7d..25fd8dc78b36 100644 --- a/aspnetcore/release-notes/aspnetcore-9/includes/web_asset_delivery.md +++ b/aspnetcore/release-notes/aspnetcore-9/includes/web_asset_delivery.md @@ -1,4 +1,4 @@ -### Optimizing static web asset delivery +### Optimize static web asset delivery Following production best practices for serving static assets requires a significant amount of work and technical expertise. Without optimizations like compression, caching, and [fingerprints](https://en.wikipedia.org/wiki/Fingerprint_(computing)): @@ -16,7 +16,7 @@ Creating performant web apps requires optimizing asset delivery to the browser. * Use a [CDN](/microsoft-365/enterprise/content-delivery-networks?view=o365-worldwide&preserve-view=true) to serve the assets closer to the user. * Minimize the size of assets served to the browser. This optimization doesn't include minification. -[`MapStaticAssets`](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) is a new middleware that helps optimize the delivery of static assets in an app. It's designed to work with all UI frameworks, including Blazor, Razor Pages, and MVC. It's typically a drop-in replacement for [UseStaticFiles](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles): + is a new feature that optimizes the delivery of static assets in an app. It's designed to work with all UI frameworks, including Blazor, Razor Pages, and MVC. It's typically a drop-in replacement for [`UseStaticFiles`](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles): ```diff var builder = WebApplication.CreateBuilder(args); diff --git a/aspnetcore/release-notes/aspnetcore-9/samples/OpenApiExample/OpenApiExample.csproj b/aspnetcore/release-notes/aspnetcore-9/samples/OpenApiExample/OpenApiExample.csproj index 8f1ac0af2547..fc9b9eeaa7f0 100644 --- a/aspnetcore/release-notes/aspnetcore-9/samples/OpenApiExample/OpenApiExample.csproj +++ b/aspnetcore/release-notes/aspnetcore-9/samples/OpenApiExample/OpenApiExample.csproj @@ -8,9 +8,8 @@ $(MSBuildProjectDirectory) - true - +