diff --git a/aspnetcore/blazor/security/blazor-web-app-with-entra.md b/aspnetcore/blazor/security/blazor-web-app-with-entra.md index 0d2b6c47d532..51285626de12 100644 --- a/aspnetcore/blazor/security/blazor-web-app-with-entra.md +++ b/aspnetcore/blazor/security/blazor-web-app-with-entra.md @@ -467,10 +467,10 @@ Obtain the application (client) ID, tenant (publisher) domain, and directory (te The authentication configuration depends on the type of tenant: -* [ME-ID tenant configuration](#me-id-tenant-configuration) -* [Microsoft Entra External ID configuration](#microsoft-entra-external-id-configuration) +* [Configuration for an ME-ID](#configuration-for-an-me-id) +* [Configuration for Microsoft Entra External ID](#configuration-for-microsoft-entra-external-id) -### ME-ID tenant configuration +### Configuration for an ME-ID *This section applies to an app registered in a Microsoft Entra ID or Azure AAD B2C tenant.* @@ -541,7 +541,7 @@ Example: List scopes = ["api://11112222-bbbb-3333-cccc-4444dddd5555/Weather.Get"]; ``` -### Microsoft Entra External ID configuration +### Configuration for Microsoft Entra External ID *This section applies to an app registered in a Microsoft Entra External ID tenant.* diff --git a/aspnetcore/diagnostics/asp0011.md b/aspnetcore/diagnostics/asp0011.md index f26a06d28776..46e9be9e71c4 100644 --- a/aspnetcore/diagnostics/asp0011.md +++ b/aspnetcore/diagnostics/asp0011.md @@ -17,11 +17,11 @@ uid: diagnostics/asp0011 ## Cause -`ConfigureLogging` isn't the recommended strategy for configuring logging in a minimal API application. +`ConfigureLogging` isn't the recommended strategy for configuring logging in a Minimal API application. ## Rule description -`ConfigureLogging` isn't the recommended strategy for configuring logging in a minimal API application. +`ConfigureLogging` isn't the recommended strategy for configuring logging in a Minimal API application. ```csharp var builder = WebApplication.CreateBuilder(args); diff --git a/aspnetcore/diagnostics/asp0012.md b/aspnetcore/diagnostics/asp0012.md index c8922c40e6cf..7e417a0ddbfd 100644 --- a/aspnetcore/diagnostics/asp0012.md +++ b/aspnetcore/diagnostics/asp0012.md @@ -17,11 +17,11 @@ uid: diagnostics/asp0012 ## Cause -`ConfigureServices` isn't the recommended strategy for registering services in DI in a minimal API application. +`ConfigureServices` isn't the recommended strategy for registering services in DI in a Minimal API application. ## Rule description -`ConfigureServices` isn't the recommended strategy for configuring logging in a minimal API application. +`ConfigureServices` isn't the recommended strategy for configuring logging in a Minimal API application. ```csharp var builder = WebApplication.CreateBuilder(args); diff --git a/aspnetcore/diagnostics/asp0013.md b/aspnetcore/diagnostics/asp0013.md index 4e4cfd82e68e..ba4a0b91a7eb 100644 --- a/aspnetcore/diagnostics/asp0013.md +++ b/aspnetcore/diagnostics/asp0013.md @@ -17,11 +17,11 @@ uid: diagnostics/asp0013 ## Cause - isn't the recommended strategy for reading and writing to configuration in a minimal API app. `Configure` was designed to be used with [Web Host](/dotnet/api/microsoft.aspnetcore.hosting.iwebhostbuilder) or [.NET Generic Host](/dotnet/core/extensions/generic-host). In a minimal API app, [WebApplicationBuilder.Configuration](xref:Microsoft.AspNetCore.Builder.WebApplicationBuilder.Configuration) should be used to modify configuration directly. + isn't the recommended strategy for reading and writing to configuration in a Minimal API app. `Configure` was designed to be used with [Web Host](/dotnet/api/microsoft.aspnetcore.hosting.iwebhostbuilder) or [.NET Generic Host](/dotnet/core/extensions/generic-host). In a Minimal API app, [WebApplicationBuilder.Configuration](xref:Microsoft.AspNetCore.Builder.WebApplicationBuilder.Configuration) should be used to modify configuration directly. ## Rule description -`Configure` isn't the recommended strategy for configuring logging in a minimal API app. +`Configure` isn't the recommended strategy for configuring logging in a Minimal API app. ```csharp var builder = WebApplication.CreateBuilder(args); diff --git a/aspnetcore/diagnostics/asp0014.md b/aspnetcore/diagnostics/asp0014.md index 298dee8c0436..1cb62348a65f 100644 --- a/aspnetcore/diagnostics/asp0014.md +++ b/aspnetcore/diagnostics/asp0014.md @@ -17,11 +17,11 @@ uid: diagnostics/asp0014 ## Cause -Routes can be registered directly at the top-level of a minimal API application. +Routes can be registered directly at the top-level of a Minimal API application. ## Rule description -Routes can be registered directly at the top-level of a minimal API application and don't need to be nested within a `UseEndpoints` call. +Routes can be registered directly at the top-level of a Minimal API application and don't need to be nested within a `UseEndpoints` call. ```csharp var builder = WebApplication.CreateBuilder(args); diff --git a/aspnetcore/diagnostics/asp0022.md b/aspnetcore/diagnostics/asp0022.md index 77237584544c..363a3e7da97f 100644 --- a/aspnetcore/diagnostics/asp0022.md +++ b/aspnetcore/diagnostics/asp0022.md @@ -33,7 +33,7 @@ Do not suppress a warning from this rule. ## Notes -[ASP0023](xref:diagnostics/asp0023) warns on route conflicts in ASP.NET Core MVC apps, this analyzer warns on route conflicts in [minimal API](xref:fundamentals/apis) apps. +[ASP0023](xref:diagnostics/asp0023) warns on route conflicts in ASP.NET Core MVC apps, this analyzer warns on route conflicts in [Minimal API](xref:fundamentals/apis) apps. This analyzer is intentionally conservative about duplicate routes it reports to avoid false positives: diff --git a/aspnetcore/diagnostics/asp0023.md b/aspnetcore/diagnostics/asp0023.md index f8fb74283afc..9fb22c8f9c88 100644 --- a/aspnetcore/diagnostics/asp0023.md +++ b/aspnetcore/diagnostics/asp0023.md @@ -33,4 +33,4 @@ Do not suppress a warning from this rule. ## Notes -[ASP0022](xref:diagnostics/asp0022) warns on route conflicts in [minimal API](xref:fundamentals/apis) apps, this analyzer warns on route conflicts in ASP.NET Core MVC apps. +[ASP0022](xref:diagnostics/asp0022) warns on route conflicts in [Minimal API](xref:fundamentals/apis) apps, this analyzer warns on route conflicts in ASP.NET Core MVC apps. diff --git a/aspnetcore/fundamentals/aot/native-aot-tutorial.md b/aspnetcore/fundamentals/aot/native-aot-tutorial.md index badfd5e2ffff..2361af1ceac1 100644 --- a/aspnetcore/fundamentals/aot/native-aot-tutorial.md +++ b/aspnetcore/fundamentals/aot/native-aot-tutorial.md @@ -166,9 +166,9 @@ info: Microsoft.Hosting.Lifetime[0] * * [Native AOT deployment](/dotnet/core/deploying/native-aot/) * [Using the configuration binder source generator](https://andrewlock.net/exploring-the-dotnet-8-preview-using-the-new-configuration-binder-source-generator/) -* [The minimal API AOT compilation template](https://andrewlock.net/exploring-the-dotnet-8-preview-the-minimal-api-aot-template/) +* [The Minimal API AOT compilation template](https://andrewlock.net/exploring-the-dotnet-8-preview-the-minimal-api-aot-template/) * [Comparing `WebApplication.CreateBuilder` to `CreateSlimBuilder`](https://andrewlock.net/exploring-the-dotnet-8-preview-comparing-createbuilder-to-the-new-createslimbuilder-method/) -* [Exploring the new minimal API source generator](https://andrewlock.net/exploring-the-dotnet-8-preview-exploring-the-new-minimal-api-source-generator/) +* [Exploring the new Minimal API source generator](https://andrewlock.net/exploring-the-dotnet-8-preview-exploring-the-new-minimal-api-source-generator/) * [Replacing method calls with Interceptors](https://andrewlock.net/exploring-the-dotnet-8-preview-changing-method-calls-with-interceptors/) * [Configuration-binding source generator](/dotnet/core/whats-new/dotnet-8#configuration-binding-source-generator) diff --git a/aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg005.md b/aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg005.md index a70892f77065..1ec015101021 100644 --- a/aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg005.md +++ b/aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg005.md @@ -28,7 +28,7 @@ This diagnostic is emitted by the [Request Delegate Generator](/aspnet/core/fund ### Rule description -The implementation of surrogate binding via the [`[AsParameters]`](xref:Microsoft.AspNetCore.Http.AsParametersAttribute) attribute in minimal APIs only supports types with concrete implementations. Using a parameter with an [abstract](/dotnet/csharp/language-reference/keywords/abstract) type as in the following sample produces the diagnostic. +The implementation of surrogate binding via the [`[AsParameters]`](xref:Microsoft.AspNetCore.Http.AsParametersAttribute) attribute in Minimal APIs only supports types with concrete implementations. Using a parameter with an [abstract](/dotnet/csharp/language-reference/keywords/abstract) type as in the following sample produces the diagnostic. :::code language="csharp" source="~/../AspNetCore.Docs.Samples/fundamentals/aot/diagnostics/Rdg5/Program.cs" id="snippet_1" highlight="13, 17-21"::: Id, string Task); diff --git a/aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg010.md b/aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg010.md index 36035557c3a9..1a80aed7adb8 100644 --- a/aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg010.md +++ b/aspnetcore/fundamentals/aot/request-delegate-generator/diagnostics/rdg010.md @@ -27,7 +27,7 @@ This diagnostic is emitted by the [Request Delegate Generator](/aspnet/core/fund ### Rule description -The implementation of surrogate binding via the [`[AsParameters]`](xref:Microsoft.AspNetCore.Http.AsParametersAttribute) attribute in minimal APIs only supports types that are not nullable. +The implementation of surrogate binding via the [`[AsParameters]`](xref:Microsoft.AspNetCore.Http.AsParametersAttribute) attribute in Minimal APIs only supports types that are not nullable. :::code language="csharp" source="~/../AspNetCore.Docs.Samples/fundamentals/aot/diagnostics/Rdg10/Program.cs" id="snippet_1" highlight="13"::: diff --git a/aspnetcore/fundamentals/aot/request-delegate-generator/rdg.md b/aspnetcore/fundamentals/aot/request-delegate-generator/rdg.md index 8b19c4d92c06..d92209e98a67 100644 --- a/aspnetcore/fundamentals/aot/request-delegate-generator/rdg.md +++ b/aspnetcore/fundamentals/aot/request-delegate-generator/rdg.md @@ -18,7 +18,7 @@ ai-usage: ai-assisted --> -The ASP.NET Core Request Delegate Generator (RDG) is a compile-time source generator that compiles route handlers provided to a minimal API to request delegates that can be processed by ASP.NET Core's routing infrastructure. The RDG is implicitly enabled when applications are published with AoT enabled or when [trimming is enabled](/dotnet/core/deploying/trimming/trimming-options#enable-trimming). The RDG generates trim and native AoT-friendly code. +The ASP.NET Core Request Delegate Generator (RDG) is a compile-time source generator that compiles route handlers provided to a Minimal API to request delegates that can be processed by ASP.NET Core's routing infrastructure. The RDG is implicitly enabled when applications are published with AoT enabled or when [trimming is enabled](/dotnet/core/deploying/trimming/trimming-options#enable-trimming). The RDG generates trim and native AoT-friendly code. > [!NOTE] > * The Native AOT feature is currently in preview. diff --git a/aspnetcore/fundamentals/error-handling.md b/aspnetcore/fundamentals/error-handling.md index 885e6da37752..ef46863bf3e8 100644 --- a/aspnetcore/fundamentals/error-handling.md +++ b/aspnetcore/fundamentals/error-handling.md @@ -325,7 +325,7 @@ An alternative approach to using context.Response.WriteAsync("Hello World")); diff --git a/aspnetcore/fundamentals/http-logging/index.md b/aspnetcore/fundamentals/http-logging/index.md index 901d37cca78f..fc4fa249a6a3 100644 --- a/aspnetcore/fundamentals/http-logging/index.md +++ b/aspnetcore/fundamentals/http-logging/index.md @@ -127,11 +127,11 @@ Setting t ## Endpoint-specific configuration -For endpoint-specific configuration in minimal API apps, a extension method is available. The following example shows how to configure HTTP logging for one endpoint: +For endpoint-specific configuration in Minimal API apps, a extension method is available. The following example shows how to configure HTTP logging for one endpoint: [!code-csharp[](~/fundamentals/http-logging/samples/8.x/Program.cs?name=snippet6)] -For endpoint-specific configuration in apps that use controllers, the [`[HttpLogging]` attribute](xref:Microsoft.AspNetCore.HttpLogging.HttpLoggingAttribute) is available. The attribute can also be used in minimal API apps, as shown in the following example: +For endpoint-specific configuration in apps that use controllers, the [`[HttpLogging]` attribute](xref:Microsoft.AspNetCore.HttpLogging.HttpLoggingAttribute) is available. The attribute can also be used in Minimal API apps, as shown in the following example: [!code-csharp[](~/fundamentals/http-logging/samples/8.x/Program.cs?name=snippet5)] diff --git a/aspnetcore/fundamentals/minimal-apis.md b/aspnetcore/fundamentals/minimal-apis.md index 0ebffb494b8c..de3a66a05c37 100644 --- a/aspnetcore/fundamentals/minimal-apis.md +++ b/aspnetcore/fundamentals/minimal-apis.md @@ -77,7 +77,7 @@ The arguments passed to these methods are called "route h [!INCLUDE [](~/fundamentals/minimal-apis/includes/parameter-binding-summary8-10.md)] -## Json+PipeReader deserialization in minimal APIs +## Json+PipeReader deserialization in Minimal APIs [!INCLUDE [](~/includes/net10pipereader.md)] diff --git a/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis6.md b/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis6.md index de1d3a1de0e8..5f9713820232 100644 --- a/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis6.md +++ b/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis6.md @@ -2,10 +2,10 @@ This document: -* Provides a quick reference for minimal APIs. +* Provides a quick reference for Minimal APIs. * Is intended for experienced developers. For an introduction, see -The minimal APIs consist of: +The Minimal APIs consist of: * and * Route handlers @@ -267,7 +267,7 @@ For more information, see ## See also -[OpenAPI support in minimal APIs](xref:fundamentals/openapi/aspnetcore-openapi) +[OpenAPI support in Minimal APIs](xref:fundamentals/openapi/aspnetcore-openapi) :::moniker-end diff --git a/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis7.md b/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis7.md index f253c47fce2f..610abcd6b6c0 100644 --- a/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis7.md +++ b/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis7.md @@ -2,10 +2,10 @@ This document: -* Provides a quick reference for minimal APIs. +* Provides a quick reference for Minimal APIs. * Is intended for experienced developers. For an introduction, see -The minimal APIs consist of: +The Minimal APIs consist of: * [WebApplication and WebApplicationBuilder](xref:fundamentals/minimal-apis/webapplication) * [Route Handlers](xref:fundamentals/minimal-apis/route-handlers) @@ -14,7 +14,7 @@ The minimal APIs consist of: ## ASP.NET Core Middleware -The following table lists some of the middleware frequently used with minimal APIs. +The following table lists some of the middleware frequently used with Minimal APIs. | Middleware | Description | API | |--|--|--| @@ -165,7 +165,7 @@ We recommend adding an extension method to interface can represent values returned from minimal APIs that don't utilize the implicit support for JSON serializing the returned object to the HTTP response. The static [Results](/dotnet/api/microsoft.aspnetcore.http.results) class is used to create varying `IResult` objects that represent different types of responses. For example, setting the response status code or redirecting to another URL. +The interface can represent values returned from Minimal APIs that don't utilize the implicit support for JSON serializing the returned object to the HTTP response. The static [Results](/dotnet/api/microsoft.aspnetcore.http.results) class is used to create varying `IResult` objects that represent different types of responses. For example, setting the response status code or redirecting to another URL. The types implementing `IResult` are public, allowing for type assertions when testing. For example: @@ -214,7 +214,7 @@ For more information, see diff --git a/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis8.md b/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis8.md index 67130b3ba76a..9fec711135a0 100644 --- a/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis8.md +++ b/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis8.md @@ -2,10 +2,10 @@ This document: -* Provides a quick reference for minimal APIs. +* Provides a quick reference for Minimal APIs. * Is intended for experienced developers. For an introduction, see . -The minimal APIs consist of: +The Minimal APIs consist of: * [WebApplication and WebApplicationBuilder](xref:fundamentals/minimal-apis/webapplication) * [Route Handlers](xref:fundamentals/minimal-apis/route-handlers) @@ -14,7 +14,7 @@ The minimal APIs consist of: ## ASP.NET Core Middleware -The following table lists some of the middleware frequently used with minimal APIs. +The following table lists some of the middleware frequently used with Minimal APIs. | Middleware | Description | API | |--|--|--| @@ -181,7 +181,7 @@ We recommend adding an extension method to interface can represent values returned from minimal APIs that don't utilize the implicit support for JSON serializing the returned object to the HTTP response. The static [Results](/dotnet/api/microsoft.aspnetcore.http.results) class is used to create varying `IResult` objects that represent different types of responses. For example, setting the response status code or redirecting to another URL. +The interface can represent values returned from Minimal APIs that don't utilize the implicit support for JSON serializing the returned object to the HTTP response. The static [Results](/dotnet/api/microsoft.aspnetcore.http.results) class is used to create varying `IResult` objects that represent different types of responses. For example, setting the response status code or redirecting to another URL. The types implementing `IResult` are public, allowing for type assertions when testing. For example: @@ -261,7 +261,7 @@ The following code disables `ValidateScopes` and `ValidateOnBuild` in `Developme * [Short-circuit routing](https://andrewlock.net/exploring-the-dotnet-8-preview-short-circuit-routing/) * [Identity API endpoints](https://andrewlock.net/exploring-the-dotnet-8-preview-introducing-the-identity-api-endpoints/) * [Keyed service dependency injection container support](https://andrewlock.net/exploring-the-dotnet-8-preview-keyed-services-dependency-injection-support/) -* [A look behind the scenes of minimal API endpoints](https://andrewlock.net/behind-the-scenes-of-minimal-apis-1-a-first-look-behind-the-scenes-of-minimal-api-endpoints/) +* [A look behind the scenes of Minimal API endpoints](https://andrewlock.net/behind-the-scenes-of-minimal-apis-1-a-first-look-behind-the-scenes-of-minimal-api-endpoints/) * [Organizing ASP.NET Core Minimal APIs](https://www.tessferrandez.com/blog/2023/10/31/organizing-minimal-apis.html) * [Fluent validation discussion on GitHub](https://github.com/dotnet/aspnetcore/issues/51834#issuecomment-1837180853) diff --git a/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis9.md b/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis9.md index babaa158a41b..df02103e293e 100644 --- a/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis9.md +++ b/aspnetcore/fundamentals/minimal-apis/includes/minimal-apis9.md @@ -2,10 +2,10 @@ This document: -* Provides a quick reference for minimal APIs. +* Provides a quick reference for Minimal APIs. * Is intended for experienced developers. For an introduction, see . -The minimal APIs consist of: +The Minimal APIs consist of: * [WebApplication and WebApplicationBuilder](xref:fundamentals/minimal-apis/webapplication) * [Route Handlers](xref:fundamentals/minimal-apis/route-handlers) @@ -14,7 +14,7 @@ The minimal APIs consist of: ## ASP.NET Core Middleware -The following table lists some of the middleware frequently used with minimal APIs. +The following table lists some of the middleware frequently used with Minimal APIs. | Middleware | Description | API | |--|--|--| @@ -181,7 +181,7 @@ We recommend adding an extension method to interface can represent values returned from minimal APIs that don't utilize the implicit support for JSON serializing the returned object to the HTTP response. The static [Results](/dotnet/api/microsoft.aspnetcore.http.results) class is used to create varying `IResult` objects that represent different types of responses. For example, setting the response status code or redirecting to another URL. +The interface can represent values returned from Minimal APIs that don't utilize the implicit support for JSON serializing the returned object to the HTTP response. The static [Results](/dotnet/api/microsoft.aspnetcore.http.results) class is used to create varying `IResult` objects that represent different types of responses. For example, setting the response status code or redirecting to another URL. The types implementing `IResult` are public, allowing for type assertions when testing. For example: @@ -261,7 +261,7 @@ The following code disables `ValidateScopes` and `ValidateOnBuild` in `Developme * [Short-circuit routing](https://andrewlock.net/exploring-the-dotnet-8-preview-short-circuit-routing/) * [Identity API endpoints](https://andrewlock.net/exploring-the-dotnet-8-preview-introducing-the-identity-api-endpoints/) * [Keyed service dependency injection container support](https://andrewlock.net/exploring-the-dotnet-8-preview-keyed-services-dependency-injection-support/) -* [A look behind the scenes of minimal API endpoints](https://andrewlock.net/behind-the-scenes-of-minimal-apis-1-a-first-look-behind-the-scenes-of-minimal-api-endpoints/) +* [A look behind the scenes of Minimal API endpoints](https://andrewlock.net/behind-the-scenes-of-minimal-apis-1-a-first-look-behind-the-scenes-of-minimal-api-endpoints/) * [Organizing ASP.NET Core Minimal APIs](https://www.tessferrandez.com/blog/2023/10/31/organizing-minimal-apis.html) * [Fluent validation discussion on GitHub](https://github.com/dotnet/aspnetcore/issues/51834#issuecomment-1837180853) diff --git a/aspnetcore/fundamentals/minimal-apis/includes/parameter-binding7.md b/aspnetcore/fundamentals/minimal-apis/includes/parameter-binding7.md index eef9de71af5a..3b900cd302bf 100644 --- a/aspnetcore/fundamentals/minimal-apis/includes/parameter-binding7.md +++ b/aspnetcore/fundamentals/minimal-apis/includes/parameter-binding7.md @@ -54,7 +54,7 @@ Attributes can be used to explicitly declare where parameters are bound from. ### Parameter binding with dependency injection -Parameter binding for minimal APIs binds parameters through [dependency injection](xref:fundamentals/dependency-injection) when the type is configured as a service. It's not necessary to explicitly apply the [`[FromServices]`](xref:Microsoft.AspNetCore.Mvc.FromServicesAttribute) attribute to a parameter. In the following code, both actions return the time: +Parameter binding for Minimal APIs binds parameters through [dependency injection](xref:fundamentals/dependency-injection) when the type is configured as a service. It's not necessary to explicitly apply the [`[FromServices]`](xref:Microsoft.AspNetCore.Mvc.FromServicesAttribute) attribute to a parameter. In the following code, both actions return the time: [!code-csharp[](~/release-notes/aspnetcore-7/samples/ApiController/Program.cs?name=snippet_min)] diff --git a/aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md b/aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md index d8dc4d1a14e3..fe887ae9335c 100644 --- a/aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md +++ b/aspnetcore/fundamentals/minimal-apis/includes/parameter-binding8-10.md @@ -73,13 +73,13 @@ Complex form binding is supported using @@ -236,7 +236,7 @@ The following code shows: In the preceding code: * The target parameter ***must*** be annotated with the [`[FromForm]`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) attribute to disambiguate from parameters that should be read from the JSON body. -* Binding from complex or collection types is ***not*** supported for minimal APIs that are compiled with the Request Delegate Generator. +* Binding from complex or collection types is ***not*** supported for Minimal APIs that are compiled with the Request Delegate Generator. * The markup shows an additional hidden input with a name of `isCompleted` and a value of `false`. If the `isCompleted` checkbox is checked when the form is submitted, both values `true` and `false` are submitted as values. If the checkbox is unchecked, only the hidden input value `false` is submitted. The ASP.NET Core model-binding process reads only the first value when binding to a `bool` value, which results in `true` for checked checkboxes and `false` for unchecked checkboxes. An example of the form data submitted to the preceding endpoint looks as follows: diff --git a/aspnetcore/fundamentals/minimal-apis/includes/responses7-8.md b/aspnetcore/fundamentals/minimal-apis/includes/responses7-8.md index 52202f858f90..a4bf287119db 100644 --- a/aspnetcore/fundamentals/minimal-apis/includes/responses7-8.md +++ b/aspnetcore/fundamentals/minimal-apis/includes/responses7-8.md @@ -73,9 +73,9 @@ In order to document this endpoint correctly the extensions method `Produces` is :::code language="csharp" source="~/tutorials/min-web-api/samples/7.x/todo/Program.cs" id="snippet_112b"::: -For more information about describing a response type, see [OpenAPI support in minimal APIs](/aspnet/core/fundamentals/openapi/aspnetcore-openapi#describe-response-types-1). +For more information about describing a response type, see [OpenAPI support in Minimal APIs](/aspnet/core/fundamentals/openapi/aspnetcore-openapi#describe-response-types-1). -As mentioned previously, when using `TypedResults`, a conversion is not needed. Consider the following minimal API which returns a `TypedResults` class +As mentioned previously, when using `TypedResults`, a conversion is not needed. Consider the following Minimal API which returns a `TypedResults` class :::code language="csharp" source="~/../AspNetCore.Docs.Samples/fundamentals/minimal-apis/samples/MinApiTestsSample/WebMinRouteGroup/TodoEndpointsV1.cs" id="snippet_1"::: @@ -232,7 +232,7 @@ public static void PopulateMetadata(MethodInfo method, EndpointBuilder builder) ## Configure JSON serialization options -By default, minimal API apps use [`Web defaults`](/dotnet/standard/serialization/system-text-json-configure-options#web-defaults-for-jsonserializeroptions) options during JSON serialization and deserialization. +By default, Minimal API apps use [`Web defaults`](/dotnet/standard/serialization/system-text-json-configure-options#web-defaults-for-jsonserializeroptions) options during JSON serialization and deserialization. ### Configure JSON serialization options globally diff --git a/aspnetcore/fundamentals/minimal-apis/includes/responses9.md b/aspnetcore/fundamentals/minimal-apis/includes/responses9.md index fa4af51a1430..627e285ca597 100644 --- a/aspnetcore/fundamentals/minimal-apis/includes/responses9.md +++ b/aspnetcore/fundamentals/minimal-apis/includes/responses9.md @@ -63,9 +63,9 @@ In order to document this endpoint correctly the extensions method `Produces` is :::code language="csharp" source="~/tutorials/min-web-api/samples/7.x/todo/Program.cs" id="snippet_112b"::: -For more information about describing a response type, see [OpenAPI support in minimal APIs](/aspnet/core/fundamentals/openapi/aspnetcore-openapi#describe-response-types-1). +For more information about describing a response type, see [OpenAPI support in Minimal APIs](/aspnet/core/fundamentals/openapi/aspnetcore-openapi#describe-response-types-1). -As mentioned previously, when using `TypedResults`, a conversion is not needed. Consider the following minimal API which returns a `TypedResults` class +As mentioned previously, when using `TypedResults`, a conversion is not needed. Consider the following Minimal API which returns a `TypedResults` class :::code language="csharp" source="~/../AspNetCore.Docs.Samples/fundamentals/minimal-apis/samples/MinApiTestsSample/WebMinRouteGroup/TodoEndpointsV1.cs" id="snippet_1"::: @@ -225,7 +225,7 @@ An alternative approach is using the = aspnetcore-7.0' ms.date: 08/22/2025 @@ -13,7 +13,7 @@ ai-usage: ai-assisted [!INCLUDE[](~/includes/not-latest-version.md)] -This article explains how to create responses for minimal API endpoints in ASP.NET Core. Minimal APIs provide several ways to return data and HTTP status codes. +This article explains how to create responses for Minimal API endpoints in ASP.NET Core. Minimal APIs provide several ways to return data and HTTP status codes. :::moniker range=">= aspnetcore-10.0" @@ -82,7 +82,7 @@ In order to document this endpoint correctly the extensions method `Produces` is :::code language="csharp" source="~/tutorials/min-web-api/samples/7.x/todo/Program.cs" id="snippet_112b"::: -For more information about describing a response type, see [OpenAPI support in minimal APIs](/aspnet/core/fundamentals/openapi/aspnetcore-openapi#describe-response-types-1). +For more information about describing a response type, see [OpenAPI support in Minimal APIs](/aspnet/core/fundamentals/openapi/aspnetcore-openapi#describe-response-types-1). For examples on testing result types, see the [Test documentation](/aspnet/core/fundamentals/minimal-apis/test-min-api#unit-test-iresult-implementation-types). @@ -151,7 +151,7 @@ The preceding example returns a 500 status code. #### Customize validation error responses using IProblemDetailsService -Customize error responses from minimal API validation logic with an implementation. Register this service in your application's service collection to enable more consistent and user-specific error responses. Support for minimal API validation was introduced in ASP.NET Core in .NET 10. +Customize error responses from Minimal API validation logic with an implementation. Register this service in your application's service collection to enable more consistent and user-specific error responses. Support for Minimal API validation was introduced in ASP.NET Core in .NET 10. To implement custom validation error responses: @@ -270,7 +270,7 @@ An alternative approach is using the = aspnetcore-7.0' @@ -10,7 +10,7 @@ uid: fundamentals/minimal-apis/security ai-usage: ai-assisted --- -# Authentication and authorization in minimal APIs +# Authentication and authorization in Minimal APIs [!INCLUDE[](~/includes/not-latest-version.md)] diff --git a/aspnetcore/fundamentals/native-aot.md b/aspnetcore/fundamentals/native-aot.md index c93b84c1ef1e..e3fd3e4d4914 100644 --- a/aspnetcore/fundamentals/native-aot.md +++ b/aspnetcore/fundamentals/native-aot.md @@ -98,7 +98,7 @@ Native AOT analysis includes all of the app's code and the libraries the app dep In .NET 8, Native AOT is supported by the following ASP.NET Core app types: -* minimal APIs - For more information, see the [The Web API (Native AOT) template](#the-web-api-native-aot-template) section later in this article. +* Minimal APIs - For more information, see the [The Web API (Native AOT) template](#the-web-api-native-aot-template) section later in this article. * gRPC - For more information, see [gRPC and Native AOT](xref:grpc/native-aot). * Worker services - For more information, see [AOT in Worker Service templates](xref:fundamentals/host/hosted-services?view=aspnetcore-8.0&preserve-view=true#native-aot). @@ -106,7 +106,7 @@ In .NET 8, Native AOT is supported by the following ASP.NET Core app types: The **ASP.NET Core Web API (Native AOT)** template (short name `webapiaot`) creates a project with AOT enabled. The template differs from the **Web API** project template in the following ways: -* Uses minimal APIs only, as MVC isn't yet compatible with Native AOT. +* Uses Minimal APIs only, as MVC isn't yet compatible with Native AOT. * Uses the API to ensure only the essential features are enabled by default, minimizing the app's deployed size. * Is configured to listen on HTTP only, as HTTPS traffic is commonly handled by an ingress service in cloud-native deployments. * Doesn't include a launch profile for running under IIS or IIS Express. @@ -296,9 +296,9 @@ See [this GitHub issue](https://github.com/dotnet/core/issues/8288) to report or * [Optimize AOT deployments](/dotnet/core/deploying/native-aot/optimizing) * [Configuration-binding source generator](/dotnet/core/whats-new/dotnet-8#configuration-binding-source-generator) * [Using the configuration binder source generator](https://andrewlock.net/exploring-the-dotnet-8-preview-using-the-new-configuration-binder-source-generator/) -* [The minimal API AOT compilation template](https://andrewlock.net/exploring-the-dotnet-8-preview-the-minimal-api-aot-template/) +* [The Minimal API AOT compilation template](https://andrewlock.net/exploring-the-dotnet-8-preview-the-minimal-api-aot-template/) * [Comparing `WebApplication.CreateBuilder` to `CreateSlimBuilder`](https://andrewlock.net/exploring-the-dotnet-8-preview-comparing-createbuilder-to-the-new-createslimbuilder-method/) -* [Exploring the new minimal API source generator](https://andrewlock.net/exploring-the-dotnet-8-preview-exploring-the-new-minimal-api-source-generator/) +* [Exploring the new Minimal API source generator](https://andrewlock.net/exploring-the-dotnet-8-preview-exploring-the-new-minimal-api-source-generator/) * [Replacing method calls with Interceptors](https://andrewlock.net/exploring-the-dotnet-8-preview-changing-method-calls-with-interceptors/) * [Behind `[LogProperties]` and the new telemetry logging source generator](https://andrewlock.net/behind-logproperties-and-the-new-telemetry-logging-source-generator/) diff --git a/aspnetcore/fundamentals/native-aot/includes/native-aot8.md b/aspnetcore/fundamentals/native-aot/includes/native-aot8.md index ff7cb66f529f..908a6c73f64e 100644 --- a/aspnetcore/fundamentals/native-aot/includes/native-aot8.md +++ b/aspnetcore/fundamentals/native-aot/includes/native-aot8.md @@ -77,7 +77,7 @@ Native AOT analysis includes all of the app's code and the libraries the app dep In .NET 8, Native AOT is supported by the following ASP.NET Core app types: -* minimal APIs - For more information, see the [The Web API (Native AOT) template](#the-web-api-native-aot-template) section later in this article. +* Minimal APIs - For more information, see the [The Web API (Native AOT) template](#the-web-api-native-aot-template) section later in this article. * gRPC - For more information, see [gRPC and Native AOT](xref:grpc/native-aot). * Worker services - For more information, see [AOT in Worker Service templates](xref:fundamentals/host/hosted-services?view=aspnetcore-8.0&preserve-view=true#native-aot). @@ -85,7 +85,7 @@ In .NET 8, Native AOT is supported by the following ASP.NET Core app types: The **ASP.NET Core Web API (Native AOT)** template (short name `webapiaot`) creates a project with AOT enabled. The template differs from the **Web API** project template in the following ways: -* Uses minimal APIs only, as MVC isn't yet compatible with Native AOT. +* Uses Minimal APIs only, as MVC isn't yet compatible with Native AOT. * Uses the API to ensure only the essential features are enabled by default, minimizing the app's deployed size. * Is configured to listen on HTTP only, as HTTPS traffic is commonly handled by an ingress service in cloud-native deployments. * Doesn't include a launch profile for running under IIS or IIS Express. @@ -274,9 +274,9 @@ See [this GitHub issue](https://github.com/dotnet/core/issues/8288) to report or * [Optimize AOT deployments](/dotnet/core/deploying/native-aot/optimizing) * [Configuration-binding source generator](/dotnet/core/whats-new/dotnet-8#configuration-binding-source-generator) * [Using the configuration binder source generator](https://andrewlock.net/exploring-the-dotnet-8-preview-using-the-new-configuration-binder-source-generator/) -* [The minimal API AOT compilation template](https://andrewlock.net/exploring-the-dotnet-8-preview-the-minimal-api-aot-template/) +* [The Minimal API AOT compilation template](https://andrewlock.net/exploring-the-dotnet-8-preview-the-minimal-api-aot-template/) * [Comparing `WebApplication.CreateBuilder` to `CreateSlimBuilder`](https://andrewlock.net/exploring-the-dotnet-8-preview-comparing-createbuilder-to-the-new-createslimbuilder-method/) -* [Exploring the new minimal API source generator](https://andrewlock.net/exploring-the-dotnet-8-preview-exploring-the-new-minimal-api-source-generator/) +* [Exploring the new Minimal API source generator](https://andrewlock.net/exploring-the-dotnet-8-preview-exploring-the-new-minimal-api-source-generator/) * [Replacing method calls with Interceptors](https://andrewlock.net/exploring-the-dotnet-8-preview-changing-method-calls-with-interceptors/) * [Behind `[LogProperties]` and the new telemetry logging source generator](https://andrewlock.net/behind-logproperties-and-the-new-telemetry-logging-source-generator/) diff --git a/aspnetcore/fundamentals/openapi/include-metadata.md b/aspnetcore/fundamentals/openapi/include-metadata.md index aa737361778e..c2fa2efa7427 100644 --- a/aspnetcore/fundamentals/openapi/include-metadata.md +++ b/aspnetcore/fundamentals/openapi/include-metadata.md @@ -21,7 +21,7 @@ ASP.NET collects metadata from the web app's endpoints and uses it to generate a In controller-based apps, metadata is collected from attributes such as [`[EndpointDescription]`](xref:Microsoft.AspNetCore.Http.EndpointDescriptionAttribute), [`[HttpPost]`](xref:Microsoft.AspNetCore.Mvc.HttpPostAttribute), and [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) when the controller has the [`[ApiController]` attribute](xref:Microsoft.AspNetCore.Mvc.ApiControllerAttribute). -In minimal APIs, metadata can be collected from attributes but may also be set by using extension methods and other strategies, such as returning from route handlers. +In Minimal APIs, metadata can be collected from attributes but may also be set by using extension methods and other strategies, such as returning from route handlers. The following table provides an overview of the metadata collected and the strategies for setting it. @@ -44,7 +44,7 @@ The following sections demonstrate how to include metadata in an app to customiz ### Summary and description The endpoint summary and description can be set using the [`[EndpointSummary]`](xref:Microsoft.AspNetCore.Http.EndpointSummaryAttribute) and [`[EndpointDescription]`](xref:Microsoft.AspNetCore.Http.EndpointDescriptionAttribute) attributes, -or in minimal APIs, using the and extension methods. +or in Minimal APIs, using the and extension methods. #### [Minimal APIs](#tab/minimal-apis) @@ -85,7 +85,7 @@ OpenAPI supports specifying tags on each endpoint as a form of categorization. #### [Minimal APIs](#tab/minimal-apis) -In minimal APIs, tags can be set using either the [`[Tags]`](xref:Microsoft.AspNetCore.Http.TagsAttribute) attribute or the extension method. +In Minimal APIs, tags can be set using either the [`[Tags]`](xref:Microsoft.AspNetCore.Http.TagsAttribute) attribute or the extension method. The following sample demonstrates the different strategies for setting tags. @@ -121,7 +121,7 @@ OpenAPI supports an operationId on each endpoint as a unique identifier or name #### [Minimal APIs](#tab/minimal-apis) -In minimal APIs, the operationId can be set using either the [`[EndpointName]`](xref:Microsoft.AspNetCore.Routing.EndpointNameAttribute) attribute or the extension method. +In Minimal APIs, the operationId can be set using either the [`[EndpointName]`](xref:Microsoft.AspNetCore.Routing.EndpointNameAttribute) attribute or the extension method. The following sample demonstrates the different strategies for setting the operationId. diff --git a/aspnetcore/fundamentals/openapi/includes/api_endpoint_operation.md b/aspnetcore/fundamentals/openapi/includes/api_endpoint_operation.md index 7ac41b75855f..3e8d16efe381 100644 --- a/aspnetcore/fundamentals/openapi/includes/api_endpoint_operation.md +++ b/aspnetcore/fundamentals/openapi/includes/api_endpoint_operation.md @@ -6,7 +6,7 @@ The following sections explain the differences between an API, an API endpoint, An API is a set of rules and protocols for building and interacting with software applications. It defines how different software components should communicate. In general web development, "API" typically refers to a web service that exposes functionality over HTTP. -In ASP.NET Core, an API is usually built using controllers or minimal APIs, which handle incoming HTTP requests and return responses. +In ASP.NET Core, an API is usually built using controllers or Minimal APIs, which handle incoming HTTP requests and return responses. ASP.NET Core's internal naming conventions sometimes use "API" differently. For instance, in [API Explorer](/dotnet/api/microsoft.aspnetcore.mvc.apiexplorer), an "ApiDescription" actually represents an [API Operation](#api-operation) rather than the full API service. This distinction reflects internal naming conventions and sometimes differ from the broader definition used here. diff --git a/aspnetcore/fundamentals/openapi/includes/aspnetcore-openapi6-8.md b/aspnetcore/fundamentals/openapi/includes/aspnetcore-openapi6-8.md index 66b5ddaf621f..9f0041cfcacd 100644 --- a/aspnetcore/fundamentals/openapi/includes/aspnetcore-openapi6-8.md +++ b/aspnetcore/fundamentals/openapi/includes/aspnetcore-openapi6-8.md @@ -189,7 +189,7 @@ When no explicit annotation is provided, the framework attempts to determine the ## Support API versioning -Minimal APIs support API versioning via the [Asp.Versioning.Http package](https://www.nuget.org/packages/Asp.Versioning.Http). Examples of configuring versioning with minimal APIs can be found in [the API versioning repo](https://github.com/dotnet/aspnet-api-versioning/tree/3857a332057d970ad11bac0edfdbff8a559a215d/examples/AspNetCore/WebApi). +Minimal APIs support API versioning via the [Asp.Versioning.Http package](https://www.nuget.org/packages/Asp.Versioning.Http). Examples of configuring versioning with Minimal APIs can be found in [the API versioning repo](https://github.com/dotnet/aspnet-api-versioning/tree/3857a332057d970ad11bac0edfdbff8a559a215d/examples/AspNetCore/WebApi). ## ASP.NET Core OpenAPI source code on GitHub @@ -204,7 +204,7 @@ Minimal APIs support API versioning via the [Asp.Versioning.Http package](https: :::moniker range="= aspnetcore-6.0" -A minimal API app can describe the [OpenAPI specification](https://swagger.io/specification/) for route handlers using [Swashbuckle](https://www.nuget.org/packages/Swashbuckle.AspNetCore/). +A Minimal API app can describe the [OpenAPI specification](https://swagger.io/specification/) for route handlers using [Swashbuckle](https://www.nuget.org/packages/Swashbuckle.AspNetCore/). For information about support for OpenAPI in controller-based APIs, see the [.NET 9 version of this article](?view=aspnetcore-9.0&preserve-view=true). diff --git a/aspnetcore/fundamentals/openapi/includes/include-metadata9.md b/aspnetcore/fundamentals/openapi/includes/include-metadata9.md index b27cbaf7304d..7c16d17cf30f 100644 --- a/aspnetcore/fundamentals/openapi/includes/include-metadata9.md +++ b/aspnetcore/fundamentals/openapi/includes/include-metadata9.md @@ -5,7 +5,7 @@ ASP.NET collects metadata from the web app's endpoints and uses it to generate a In controller-based apps, metadata is collected from attributes such as [`[EndpointDescription]`](xref:Microsoft.AspNetCore.Http.EndpointDescriptionAttribute), [`[HttpPost]`](xref:Microsoft.AspNetCore.Mvc.HttpPostAttribute), and [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) when the controller has the [`[ApiController]` attribute](xref:Microsoft.AspNetCore.Mvc.ApiControllerAttribute). -In minimal APIs, metadata can be collected from attributes but may also be set by using extension methods and other strategies, such as returning from route handlers. +In Minimal APIs, metadata can be collected from attributes but may also be set by using extension methods and other strategies, such as returning from route handlers. The following table provides an overview of the metadata collected and the strategies for setting it. @@ -28,7 +28,7 @@ The following sections demonstrate how to include metadata in an app to customiz ### Summary and description The endpoint summary and description can be set using the [`[EndpointSummary]`](xref:Microsoft.AspNetCore.Http.EndpointSummaryAttribute) and [`[EndpointDescription]`](xref:Microsoft.AspNetCore.Http.EndpointDescriptionAttribute) attributes, -or in minimal APIs, using the and extension methods. +or in Minimal APIs, using the and extension methods. #### [Minimal APIs](#tab/minimal-apis) @@ -69,7 +69,7 @@ OpenAPI supports specifying tags on each endpoint as a form of categorization. #### [Minimal APIs](#tab/minimal-apis) -In minimal APIs, tags can be set using either the [`[Tags]`](xref:Microsoft.AspNetCore.Http.TagsAttribute) attribute or the extension method. +In Minimal APIs, tags can be set using either the [`[Tags]`](xref:Microsoft.AspNetCore.Http.TagsAttribute) attribute or the extension method. The following sample demonstrates the different strategies for setting tags. @@ -105,7 +105,7 @@ OpenAPI supports an operationId on each endpoint as a unique identifier or name #### [Minimal APIs](#tab/minimal-apis) -In minimal APIs, the operationId can be set using either the [`[EndpointName]`](xref:Microsoft.AspNetCore.Routing.EndpointNameAttribute) attribute or the extension method. +In Minimal APIs, the operationId can be set using either the [`[EndpointName]`](xref:Microsoft.AspNetCore.Routing.EndpointNameAttribute) attribute or the extension method. The following sample demonstrates the different strategies for setting the operationId. diff --git a/aspnetcore/fundamentals/openapi/includes/overview6-8.md b/aspnetcore/fundamentals/openapi/includes/overview6-8.md index 477e491eeef3..29b65d6c836a 100644 --- a/aspnetcore/fundamentals/openapi/includes/overview6-8.md +++ b/aspnetcore/fundamentals/openapi/includes/overview6-8.md @@ -1,6 +1,6 @@ :::moniker range=">= aspnetcore-6.0 <= aspnetcore-8.0" -The [OpenAPI specification](https://spec.openapis.org/oas/latest.html) is a programming language-agnostic standard for documenting HTTP APIs. This standard is supported in minimal APIs through a combination of built-in APIs and open-source libraries. There are three key aspects to OpenAPI integration in an application: +The [OpenAPI specification](https://spec.openapis.org/oas/latest.html) is a programming language-agnostic standard for documenting HTTP APIs. This standard is supported in Minimal APIs through a combination of built-in APIs and open-source libraries. There are three key aspects to OpenAPI integration in an application: * Generating information about the endpoints in the app. * Gathering the information into a format that matches the OpenAPI schema. diff --git a/aspnetcore/fundamentals/openapi/includes/using-openapi-documents-6-8.md b/aspnetcore/fundamentals/openapi/includes/using-openapi-documents-6-8.md index 5cce4504ccab..0cc40dfb7cbc 100644 --- a/aspnetcore/fundamentals/openapi/includes/using-openapi-documents-6-8.md +++ b/aspnetcore/fundamentals/openapi/includes/using-openapi-documents-6-8.md @@ -1,5 +1,5 @@ :::moniker range=">= aspnetcore-6.0 <= aspnetcore-8.0" -To learn how to use the generated OpenAPI document in a minimal API in .NET 6, 7, or 8, see the [Swagger and NSwag overview](xref:tutorials/web-api-help-pages-using-swagger). +To learn how to use the generated OpenAPI document in a Minimal API in .NET 6, 7, or 8, see the [Swagger and NSwag overview](xref:tutorials/web-api-help-pages-using-swagger). :::moniker-end diff --git a/aspnetcore/fundamentals/openapi/overview.md b/aspnetcore/fundamentals/openapi/overview.md index 560058c1a171..771958f8609a 100644 --- a/aspnetcore/fundamentals/openapi/overview.md +++ b/aspnetcore/fundamentals/openapi/overview.md @@ -13,7 +13,7 @@ uid: fundamentals/openapi/overview :::moniker range=">= aspnetcore-9.0" -ASP.NET Core supports the generation of OpenAPI documents in controller-based and minimal APIs apps. +ASP.NET Core supports the generation of OpenAPI documents in controller-based and Minimal APIs apps. The [OpenAPI specification](https://spec.openapis.org/oas/latest.html) is a programming language-agnostic standard for documenting HTTP APIs. This standard is supported in ASP.NET Core apps through a combination of built-in APIs and open-source libraries. There are three key aspects to OpenAPI integration in an application: * Generating information about the endpoints in the app. diff --git a/aspnetcore/fundamentals/openapi/using-openapi-documents.md b/aspnetcore/fundamentals/openapi/using-openapi-documents.md index b07ab2643cba..b592b874689d 100644 --- a/aspnetcore/fundamentals/openapi/using-openapi-documents.md +++ b/aspnetcore/fundamentals/openapi/using-openapi-documents.md @@ -5,7 +5,7 @@ description: Learn how to use OpenAPI documents in an ASP.NET Core app. ms.author: safia monikerRange: '>= aspnetcore-6.0' ms.custom: mvc -ms.date: 08/04/2025 +ms.date: 12/04/2025 uid: fundamentals/openapi/using-openapi-documents --- # Use openAPI documents @@ -105,11 +105,11 @@ The output shows any issues with the OpenAPI document. For example: You can inject into your services through dependency injection to access OpenAPI documents programmatically, even outside HTTP request contexts. ```csharp -public class DocumentService +public class CustomDocumentService { private readonly IOpenApiDocumentProvider _documentProvider; - public DocumentService(IOpenApiDocumentProvider documentProvider) + public CustomDocumentService(IOpenApiDocumentProvider documentProvider) { _documentProvider = documentProvider; } @@ -124,7 +124,7 @@ public class DocumentService Register the service in your DI container: ```csharp -builder.Services.AddScoped(); +builder.Services.AddScoped(); ``` This enables scenarios such as generating client SDKs, validating API contracts in background processes, or exporting documents to external systems. diff --git a/aspnetcore/index.yml b/aspnetcore/index.yml index 4938a6e3b914..bad4f5ed6a31 100644 --- a/aspnetcore/index.yml +++ b/aspnetcore/index.yml @@ -52,7 +52,7 @@ conceptualContent: links: - url: fundamentals/apis.md itemType: overview - text: "Choose between controller-based APIs and minimal APIs" + text: "Choose between controller-based APIs and Minimal APIs" - url: tutorials/min-web-api.md itemType: get-started text: "Create a minimal web API with ASP.NET Core" diff --git a/aspnetcore/log-mon/metrics/metrics.md b/aspnetcore/log-mon/metrics/metrics.md index 126d085bbe65..ce870a41a13c 100644 --- a/aspnetcore/log-mon/metrics/metrics.md +++ b/aspnetcore/log-mon/metrics/metrics.md @@ -152,7 +152,7 @@ Register the metrics type with DI in `Program.cs`: :::code language="csharp" source="~/log-mon/metrics/metrics/samples/custom-metrics/Program.cs" id="snippet_RegisterMetrics"::: -Inject the metrics type and record values where needed. Because the metrics type is registered in DI it can be use with MVC controllers, minimal APIs, or any other type that is created by DI: +Inject the metrics type and record values where needed. Because the metrics type is registered in DI it can be use with MVC controllers, Minimal APIs, or any other type that is created by DI: :::code language="csharp" source="~/log-mon/metrics/metrics/samples/custom-metrics/Program.cs" id="snippet_InjectAndUseMetrics"::: diff --git a/aspnetcore/migration/fx-to-core/areas/webapi.md b/aspnetcore/migration/fx-to-core/areas/webapi.md index fc20c1a13b37..a66690162bc8 100644 --- a/aspnetcore/migration/fx-to-core/areas/webapi.md +++ b/aspnetcore/migration/fx-to-core/areas/webapi.md @@ -36,7 +36,7 @@ This article shows how to migrate the Products controller created in [Getting St 1. In the **Configure your new project** dialog, name the project *ProductsCore* and select **Next**. 1. In the **Additional information** dialog: 1. Confirm the **Framework** is **.NET 6.0 (Long-term support)**. - 1. Confirm the checkbox for **Use controllers(uncheck to use minimal APIs)** is checked. + 1. Confirm the checkbox for **Use controllers(uncheck to use Minimal APIs)** is checked. 1. Uncheck **Enable OpenAPI support**. 1. Select **Create**. diff --git a/aspnetcore/migration/fx-to-core/inc/ab-testing.md b/aspnetcore/migration/fx-to-core/inc/ab-testing.md index ed537891ee67..d5fba968f269 100644 --- a/aspnetcore/migration/fx-to-core/inc/ab-testing.md +++ b/aspnetcore/migration/fx-to-core/inc/ab-testing.md @@ -19,7 +19,7 @@ This document describes how to setup a conditional endpoint selection system to To enable conditional endpoint selection, a few services need to be defined: -1. Metadata that can be added to an endpoint to turn on any conditional related logic. Endpoints include controllers, minimal APIs, Razor Page, etc. If this metadata isn't added to an endpoint, no conditional checks are performed for it. +1. Metadata that can be added to an endpoint to turn on any conditional related logic. Endpoints include controllers, Minimal APIs, Razor Page, etc. If this metadata isn't added to an endpoint, no conditional checks are performed for it. ```CSharp [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] diff --git a/aspnetcore/mvc/models/file-uploads.md b/aspnetcore/mvc/models/file-uploads.md index 17bffb8ea4eb..1adef0257d10 100644 --- a/aspnetcore/mvc/models/file-uploads.md +++ b/aspnetcore/mvc/models/file-uploads.md @@ -454,7 +454,7 @@ var filePath = Request.Form.Files.First().FileName; return Results.Ok($"Saved file at {filePath}"); ``` -For advanced scenarios, manually parse the raw request body using , which exposes an [`IPipeReader`](/aspnet/core/fundamentals/middleware/request-response) for low-level, high-performance streaming. The sample app includes endpoint handlers that use `IPipeReader` in both minimal APIs and controllers. +For advanced scenarios, manually parse the raw request body using , which exposes an [`IPipeReader`](/aspnet/core/fundamentals/middleware/request-response) for low-level, high-performance streaming. The sample app includes endpoint handlers that use `IPipeReader` in both Minimal APIs and controllers. The [3.1 example](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/mvc/models/file-uploads/samples/3.x/SampleApp/Pages/StreamedSingleFileUploadDb.cshtml) demonstrates how to use JavaScript to stream a file to a controller action. The file's antiforgery token is generated using a custom filter attribute and passed to the client HTTP headers instead of in the request body. Because the action method processes the uploaded data directly, form model binding is disabled by another custom filter. Within the action, the form's contents are read using a `MultipartReader`, which reads each individual `MultipartSection`, processing the file or storing the contents as appropriate. After the multipart sections are read, the action performs its own model binding. diff --git a/aspnetcore/performance/caching/output.md b/aspnetcore/performance/caching/output.md index 9bb405665e6b..0aacbfee0f5a 100644 --- a/aspnetcore/performance/caching/output.md +++ b/aspnetcore/performance/caching/output.md @@ -18,7 +18,7 @@ By [Tom Dykstra](https://github.com/tdykstra) This article explains how to configure output caching middleware in an ASP.NET Core app. For an introduction to output caching, see [Output caching](xref:performance/caching/overview#output-caching). -The output caching middleware can be used in all types of ASP.NET Core apps: Minimal API, Web API with controllers, MVC, and Razor Pages. Code examples are provided for minimal APIs and controller-based APIs. The controller-based API examples show how to use attributes to configure caching. These attributes can also be used in MVC and Razor Pages apps. +The output caching middleware can be used in all types of ASP.NET Core apps: Minimal API, Web API with controllers, MVC, and Razor Pages. Code examples are provided for Minimal APIs and controller-based APIs. The controller-based API examples show how to use attributes to configure caching. These attributes can also be used in MVC and Razor Pages apps. The code examples refer to a [Gravatar class](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/performance/caching/output/samples/7.x/Gravatar.cs) that generates an image and provides a "generated at" date and time. The class is defined and used only in [the sample app](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/performance/caching/output/samples/7.x). Its purpose is to make it easy to see when cached output is being used. For more information, see [How to download a sample](xref:fundamentals/index#how-to-download-a-sample) and [Preprocessor directives in sample code](xref:index#preprocessor-directives-in-sample-code). @@ -41,7 +41,7 @@ Calling `AddOutputCache`and `UseOutputCache` doesn't start caching behavior, it ## Configure one endpoint or page -For minimal API apps, configure an endpoint to do caching by calling [`CacheOutput`](xref:Microsoft.Extensions.DependencyInjection.OutputCacheConventionBuilderExtensions.CacheOutput%2A), or by applying the [`[OutputCache]`](xref:Microsoft.AspNetCore.OutputCaching.OutputCacheAttribute) attribute, as shown in the following examples: +For Minimal API apps, configure an endpoint to do caching by calling [`CacheOutput`](xref:Microsoft.Extensions.DependencyInjection.OutputCacheConventionBuilderExtensions.CacheOutput%2A), or by applying the [`[OutputCache]`](xref:Microsoft.AspNetCore.OutputCaching.OutputCacheAttribute) attribute, as shown in the following examples: :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="oneendpoint"::: @@ -65,7 +65,7 @@ The following highlighted code creates two policies, each specifying a different You can select a policy for an endpoint when calling the `CacheOutput` method or using the `[OutputCache]` attribute. -In a minimal API app, the following code configures one endpoint with a 20-second expiration and one with a 30-second expiration: +In a Minimal API app, the following code configures one endpoint with a 20-second expiration and one with a 30-second expiration: :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="selectpolicy"::: @@ -98,7 +98,7 @@ To use this custom policy, create a named policy: :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="policies3b"::: -And select the named policy for an endpoint. The following code selects the custom policy for an endpoint in a minimal API app: +And select the named policy for an endpoint. The following code selects the custom policy for an endpoint in a Minimal API app: :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="post"::: @@ -131,7 +131,7 @@ By default, every part of the URL is included as the key to a cache entry, that :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="policies2" highlight="7"::: -You can then select the `VaryByQuery` policy for an endpoint. In a minimal API app, the following code selects the `VaryByQuery` policy for an endpoint that returns a unique response only for each unique value of the `culture` query string: +You can then select the `VaryByQuery` policy for an endpoint. In a Minimal API app, the following code selects the `VaryByQuery` policy for an endpoint that returns a unique response only for each unique value of the `culture` query string: :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="selectquery"::: @@ -169,7 +169,7 @@ Cache revalidation is automatic in response to these headers sent from the clien ## Use tags to evict cache entries -You can use tags to identify a group of endpoints and evict all cache entries for the group. For example, the following minimal API code creates a pair of endpoints whose URLs begin with "blog", and tags them "tag-blog": +You can use tags to identify a group of endpoints and evict all cache entries for the group. For example, the following Minimal API code creates a pair of endpoints whose URLs begin with "blog", and tags them "tag-blog": :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="tagendpoint"::: @@ -181,7 +181,7 @@ An alternative way to assign tags for endpoints with routes that begin with `blo :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="policies2" highlight="3-5"::: -Another alternative for minimal API apps is to call `MapGroup`: +Another alternative for Minimal API apps is to call `MapGroup`: :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="taggroup"::: @@ -205,7 +205,7 @@ To disable resource locking, call [SetLocking(false)](xref:Microsoft.AspNetCore. :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="policies2" highlight="9"::: -The following example selects the no-locking policy for an endpoint in a minimal API app: +The following example selects the no-locking policy for an endpoint in a Minimal API app: :::code language="csharp" source="~/performance/caching/output/samples/7.x/Program.cs" id="selectnolock"::: diff --git a/aspnetcore/performance/caching/output/includes/output7.md b/aspnetcore/performance/caching/output/includes/output7.md index 5634c7d89aaa..efdebab9a519 100644 --- a/aspnetcore/performance/caching/output/includes/output7.md +++ b/aspnetcore/performance/caching/output/includes/output7.md @@ -17,7 +17,7 @@ Add the middleware to the request processing pipeline by calling , or by applying the [`[RequestTimeout]`](xref:Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutAttribute) attribute, as shown in the following example: +For Minimal API apps, configure an endpoint to timeout by calling , or by applying the [`[RequestTimeout]`](xref:Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutAttribute) attribute, as shown in the following example: :::code language="csharp" source="~/performance/timeouts/samples/8.x/Program.cs" id="oneendpoint" highlight="20,24"::: diff --git a/aspnetcore/release-notes/aspnetcore-10.0.md b/aspnetcore/release-notes/aspnetcore-10.0.md index 281cad22a986..f5fa85592af5 100644 --- a/aspnetcore/release-notes/aspnetcore-10.0.md +++ b/aspnetcore/release-notes/aspnetcore-10.0.md @@ -31,7 +31,7 @@ This section describes new features for SignalR. ## Minimal APIs -This section describes new features for minimal APIs. +This section describes new features for Minimal APIs. [!INCLUDE[](~/release-notes/aspnetcore-10/includes/MinApiEmptyStringInFormPost.md)] diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/MinApiEmptyStringInFormPost.md b/aspnetcore/release-notes/aspnetcore-10/includes/MinApiEmptyStringInFormPost.md index 2f88b2bc08da..359ede48be05 100644 --- a/aspnetcore/release-notes/aspnetcore-10/includes/MinApiEmptyStringInFormPost.md +++ b/aspnetcore/release-notes/aspnetcore-10/includes/MinApiEmptyStringInFormPost.md @@ -1,6 +1,6 @@ ### Treating empty string in form post as null for nullable value types -When using the `[FromForm]` attribute with a complex object in minimal APIs, empty string values in a form post are now converted to `null` rather than causing a parse failure. This behavior matches the processing logic for form posts not associated with complex objects in minimal APIs. +When using the `[FromForm]` attribute with a complex object in Minimal APIs, empty string values in a form post are now converted to `null` rather than causing a parse failure. This behavior matches the processing logic for form posts not associated with complex objects in Minimal APIs. ```csharp using Microsoft.AspNetCore.Http; diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/OpenApiPopulateXMLDocComments.md b/aspnetcore/release-notes/aspnetcore-10/includes/OpenApiPopulateXMLDocComments.md index be80ed5252ad..de33a32e3590 100644 --- a/aspnetcore/release-notes/aspnetcore-10/includes/OpenApiPopulateXMLDocComments.md +++ b/aspnetcore/release-notes/aspnetcore-10/includes/OpenApiPopulateXMLDocComments.md @@ -10,7 +10,7 @@ ASP.NET Core OpenAPI document generation will now include metadata from XML doc At build-time, the OpenAPI package will leverage a source generator to discover XML comments in the current application assembly and any project references and emit source code to insert them into the document via an OpenAPI document transformer. -Note that the C# build process does not capture XML doc comments placed on lambda expresions, so to use XML doc comments to add metadata to a minimal API endpoint, you must define the endpoint handler as a method, put the XML doc comments on the method, and then reference that method from the `MapXXX` method. For example, to use XML doc comments to add metadata to a minimal API endpoint originally defined as a lambda expression: +Note that the C# build process does not capture XML doc comments placed on lambda expresions, so to use XML doc comments to add metadata to a Minimal API endpoint, you must define the endpoint handler as a method, put the XML doc comments on the method, and then reference that method from the `MapXXX` method. For example, to use XML doc comments to add metadata to a Minimal API endpoint originally defined as a lambda expression: ```csharp app.MapGet("/hello", (string name) =>$"Hello, {name}!"); diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/ValidationSupportMinAPI.md b/aspnetcore/release-notes/aspnetcore-10/includes/ValidationSupportMinAPI.md index 4525d0fc7e9d..a6021d70dd05 100644 --- a/aspnetcore/release-notes/aspnetcore-10/includes/ValidationSupportMinAPI.md +++ b/aspnetcore/release-notes/aspnetcore-10/includes/ValidationSupportMinAPI.md @@ -13,15 +13,15 @@ Validations are defined using attributes in the [`DataAnnotations`](xref:System. If validation fails, the runtime returns a 400 Bad Request response with details of the validation errors. -#### Enable built-in validation support for minimal APIs +#### Enable built-in validation support for Minimal APIs -Enable the built-in validation support for minimal APIs by calling the `AddValidation` extension method to register the required services in the service container for your application: +Enable the built-in validation support for Minimal APIs by calling the `AddValidation` extension method to register the required services in the service container for your application: ```csharp builder.Services.AddValidation(); ``` -The implementation automatically discovers types that are defined in minimal API handlers or as base types of types defined in minimal API handlers. An endpoint filter performs validation on these types and is added for each endpoint. +The implementation automatically discovers types that are defined in Minimal API handlers or as base types of types defined in Minimal API handlers. An endpoint filter performs validation on these types and is added for each endpoint. Validation can be disabled for specific endpoints by using the `DisableValidation` extension method, as in the following example: diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/validation-with-problem.md b/aspnetcore/release-notes/aspnetcore-10/includes/validation-with-problem.md index 8dd43e160f18..a3ee87c11b03 100644 --- a/aspnetcore/release-notes/aspnetcore-10/includes/validation-with-problem.md +++ b/aspnetcore/release-notes/aspnetcore-10/includes/validation-with-problem.md @@ -1,4 +1,4 @@ ### Minimal API Validation integration with IProblemDetailsService -Error responses from the validation logic for minimal APIs can now be customized by an `IProblemDetailsService` implementation provided in the application services collection (Dependency Injection container). This enables more consistent and user-specific error responses. +Error responses from the validation logic for Minimal APIs can now be customized by an `IProblemDetailsService` implementation provided in the application services collection (Dependency Injection container). This enables more consistent and user-specific error responses. diff --git a/aspnetcore/release-notes/aspnetcore-11.md b/aspnetcore/release-notes/aspnetcore-11.md index bf034493d513..b6f2c58a2f3e 100644 --- a/aspnetcore/release-notes/aspnetcore-11.md +++ b/aspnetcore/release-notes/aspnetcore-11.md @@ -47,7 +47,7 @@ This section describes new features for SignalR. ## Minimal APIs -This section describes new features for minimal APIs. +This section describes new features for Minimal APIs. ## OpenAPI diff --git a/aspnetcore/release-notes/aspnetcore-6.0.md b/aspnetcore/release-notes/aspnetcore-6.0.md index a63c94ed9368..92d5c8a2d5a0 100644 --- a/aspnetcore/release-notes/aspnetcore-6.0.md +++ b/aspnetcore/release-notes/aspnetcore-6.0.md @@ -18,7 +18,7 @@ This article highlights the most significant changes in ASP.NET Core in .NET 6 w Minimal APIs are architected to create HTTP APIs with minimal dependencies. They are ideal for microservices and apps that want to include only the minimum files, features, and dependencies in ASP.NET Core. For more information, see: * -* [Differences between minimal APIs and APIs with controllers](xref:tutorials/min-web-api?view=aspnetcore-6.0#differences-between-minimal-apis-and-apis-with-controllers) +* [Differences between Minimal APIs and APIs with controllers](xref:tutorials/min-web-api?view=aspnetcore-6.0#differences-between-minimal-apis-and-apis-with-controllers) * * diff --git a/aspnetcore/release-notes/aspnetcore-7.0.md b/aspnetcore/release-notes/aspnetcore-7.0.md index d5050dd400cf..d837fba52a3b 100644 --- a/aspnetcore/release-notes/aspnetcore-7.0.md +++ b/aspnetcore/release-notes/aspnetcore-7.0.md @@ -122,9 +122,9 @@ We introduced new [`Results.Stream`](/dotnet/api/microsoft.aspnetcore.http.resul For more information, see [Stream examples](xref:fundamentals/minimal-apis?view=aspnetcore-7.0&preserve-view=true#stream7) -### Typed results for minimal APIs +### Typed results for Minimal APIs -In .NET 6, the interface was introduced to represent values returned from minimal APIs that don't utilize the implicit support for JSON serializing the returned object to the HTTP response. The static [Results](/dotnet/api/microsoft.aspnetcore.http.results) class is used to create varying `IResult` objects that represent different types of responses. For example, setting the response status code or redirecting to another URL. The `IResult` implementing framework types returned from these methods were internal however, making it difficult to verify the specific `IResult` type being returned from methods in a unit test. +In .NET 6, the interface was introduced to represent values returned from Minimal APIs that don't utilize the implicit support for JSON serializing the returned object to the HTTP response. The static [Results](/dotnet/api/microsoft.aspnetcore.http.results) class is used to create varying `IResult` objects that represent different types of responses. For example, setting the response status code or redirecting to another URL. The `IResult` implementing framework types returned from these methods were internal however, making it difficult to verify the specific `IResult` type being returned from methods in a unit test. In .NET 7 the types implementing `IResult` are public, allowing for type assertions when testing. For example: @@ -153,7 +153,7 @@ The following interfaces in the namespace provi For more information, see [IHttpResult interfaces](xref:fundamentals/minimal-apis/responses#httpresultinterfaces7). -### OpenAPI improvements for minimal APIs +### OpenAPI improvements for Minimal APIs @@ -173,7 +173,7 @@ The [`WithOpenApi`](https://github.com/dotnet/aspnetcore/blob/8a4b4deb09c04134f2 Minimal APIs now support annotating operations with descriptions and summaries for OpenAPI spec generation. You can call extension methods and or use attributes [[EndpointDescription]](xref:Microsoft.AspNetCore.Http.EndpointDescriptionAttribute) and [[EndpointSummary]](xref:Microsoft.AspNetCore.Http.EndpointSummaryAttribute)). -For more information, see [OpenAPI in minimal API apps](xref:fundamentals/openapi/aspnetcore-openapi?view=aspnetcore-7.0) +For more information, see [OpenAPI in Minimal API apps](xref:fundamentals/openapi/aspnetcore-openapi?view=aspnetcore-7.0) ### File uploads using IFormFile and IFormFileCollection diff --git a/aspnetcore/release-notes/aspnetcore-8.0.md b/aspnetcore/release-notes/aspnetcore-8.0.md index 2adb8d3766bb..a8e69c79876f 100644 --- a/aspnetcore/release-notes/aspnetcore-8.0.md +++ b/aspnetcore/release-notes/aspnetcore-8.0.md @@ -524,7 +524,7 @@ For more information, see [Configure stateful reconnect](xref:signalr/configurat ## Minimal APIs -This section describes new features for minimal APIs. See also [the section on Native AOT](#native-aot) for more information relevant to minimal APIs. +This section describes new features for Minimal APIs. See also [the section on Native AOT](#native-aot) for more information relevant to Minimal APIs. ### User override culture @@ -547,7 +547,7 @@ For more information, see: * [Explicit binding from form values](xref:fundamentals/minimal-apis/parameter-binding?view=aspnetcore-8.0&preserve-view=true#explicit-binding-from-form-values). * [Binding to forms with IFormCollection, IFormFile, and IFormFileCollection](xref:fundamentals/minimal-apis/parameter-binding?view=aspnetcore-8.0&preserve-view=true#binding-to-forms-with-iformcollection-iformfile-and-iformfilecollection). -* [Form binding in minimal APIs](https://andrewlock.net/exploring-the-dotnet-8-preview-form-binding-in-minimal-apis/) +* [Form binding in Minimal APIs](https://andrewlock.net/exploring-the-dotnet-8-preview-form-binding-in-minimal-apis/) Binding from forms is now supported for: @@ -556,7 +556,7 @@ Binding from forms is now supported for: For more information, see [Bind to collections and complex types from forms](xref:fundamentals/minimal-apis/parameter-binding#bindcc). -### Antiforgery with minimal APIs +### Antiforgery with Minimal APIs This release adds a middleware for validating antiforgery tokens, which are used to mitigate cross-site request forgery attacks. Call [AddAntiforgery](/dotnet/api/microsoft.extensions.dependencyinjection.antiforgeryservicecollectionextensions.addantiforgery) to register antiforgery services in DI. `WebApplicationBuilder` automatically adds the middleware when the antiforgery services have been registered in the DI container. Antiforgery tokens are used to mitigate [cross-site request forgery attacks](xref:security/anti-request-forgery). @@ -585,7 +585,7 @@ For more information, see the [ObjectPool sample](xref:performance/ObjectPool##o ## Native AOT -Support for [.NET native ahead-of-time (AOT)](/dotnet/core/deploying/native-aot/) has been added. Apps that are published using AOT can have substantially better performance: smaller app size, less memory usage, and faster startup time. Native AOT is currently supported by gRPC, minimal API, and worker service apps. For more information, see and . For information about known issues with ASP.NET Core and Native AOT compatibility, see GitHub issue [dotnet/core #8288](https://github.com/dotnet/core/issues/8288). +Support for [.NET native ahead-of-time (AOT)](/dotnet/core/deploying/native-aot/) has been added. Apps that are published using AOT can have substantially better performance: smaller app size, less memory usage, and faster startup time. Native AOT is currently supported by gRPC, Minimal API, and worker service apps. For more information, see and . For information about known issues with ASP.NET Core and Native AOT compatibility, see GitHub issue [dotnet/core #8288](https://github.com/dotnet/core/issues/8288). [!INCLUDE[](~/fundamentals/aot/includes/aot_lib.md)] @@ -648,11 +648,11 @@ The RDG is enabled automatically in a project when publishing with Native AOT is ### Improved performance using Interceptors -The Request Delegate Generator uses the new [C# 12 interceptors compiler feature](/dotnet/csharp/whats-new/csharp-12) to support intercepting calls to minimal API [Map](xref:Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions) methods with statically generated variants at runtime. The use of interceptors results in increased startup performance for apps compiled with `PublishAot`. +The Request Delegate Generator uses the new [C# 12 interceptors compiler feature](/dotnet/csharp/whats-new/csharp-12) to support intercepting calls to Minimal API [Map](xref:Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions) methods with statically generated variants at runtime. The use of interceptors results in increased startup performance for apps compiled with `PublishAot`. -### Logging and exception handling in compile-time generated minimal APIs +### Logging and exception handling in compile-time generated Minimal APIs -Minimal APIs generated at run time support automatically logging (or throwing exceptions in Development environments) when parameter binding fails. .NET 8 introduces the same support for APIs generated at compile time via the [Request Delegate Generator](#request-delegate-generator) (RDG). For more information, see [Logging and exception handling in compile-time generated minimal APIs](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-4/#logging-and-exception-handling-in-compile-time-generated-minimal-apis). +Minimal APIs generated at run time support automatically logging (or throwing exceptions in Development environments) when parameter binding fails. .NET 8 introduces the same support for APIs generated at compile time via the [Request Delegate Generator](#request-delegate-generator) (RDG). For more information, see [Logging and exception handling in compile-time generated Minimal APIs](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-4/#logging-and-exception-handling-in-compile-time-generated-minimal-apis). ### AOT and System.Text.Json @@ -667,7 +667,7 @@ builder.Services.ConfigureHttpJsonOptions(options => ... -// Add types used in the minimal API app to source generated JSON serializer content +// Add types used in the Minimal API app to source generated JSON serializer content [JsonSerializable(typeof(Todo[]))] internal partial class AppJsonSerializerContext : JsonSerializerContext { @@ -1030,7 +1030,7 @@ var network = new IPNetwork(IPAddress.Parse("2001:db8:3c4d::1"), 128); ### Redis-based output caching -ASP.NET Core in .NET 8 adds support for using Redis as a distributed cache for output caching. Output caching is a feature that enables an app to cache the output of a minimal API endpoint, controller action, or Razor Page. For more information, see [Output caching](xref:performance/caching/output#cache-storage). +ASP.NET Core in .NET 8 adds support for using Redis as a distributed cache for output caching. Output caching is a feature that enables an app to cache the output of a Minimal API endpoint, controller action, or Razor Page. For more information, see [Output caching](xref:performance/caching/output#cache-storage). ### Short-circuit middleware after routing diff --git a/aspnetcore/release-notes/aspnetcore-9.0.md b/aspnetcore/release-notes/aspnetcore-9.0.md index 65e055ab2ccf..417998e11d8e 100644 --- a/aspnetcore/release-notes/aspnetcore-9.0.md +++ b/aspnetcore/release-notes/aspnetcore-9.0.md @@ -37,7 +37,7 @@ This section describes new features for SignalR. ## Minimal APIs -This section describes new features for minimal APIs. +This section describes new features for Minimal APIs. [!INCLUDE[](~/release-notes/aspnetcore-9/includes/status500.md)] diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/openApi.md b/aspnetcore/release-notes/aspnetcore-9/includes/openApi.md index 7bf88139a3ba..8f7d41a10c5c 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, 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: diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/produces-problem.md b/aspnetcore/release-notes/aspnetcore-9/includes/produces-problem.md index 376a55181997..7ee71975ef76 100644 --- a/aspnetcore/release-notes/aspnetcore-9/includes/produces-problem.md +++ b/aspnetcore/release-notes/aspnetcore-9/includes/produces-problem.md @@ -18,7 +18,7 @@ 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>`. +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" ::: diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/signalr-trimming-aot.md b/aspnetcore/release-notes/aspnetcore-9/includes/signalr-trimming-aot.md index 21c1f2c7e02b..0e74fd221853 100644 --- a/aspnetcore/release-notes/aspnetcore-9/includes/signalr-trimming-aot.md +++ b/aspnetcore/release-notes/aspnetcore-9/includes/signalr-trimming-aot.md @@ -22,7 +22,7 @@ The preceding example produces a native Windows executable of 10 MB and a Linux * Only the JSON protocol is currently supported: * As shown in the preceding code, apps that use JSON serialization and Native AOT must use the `System.Text.Json` Source Generator. - * This follows the same approach as minimal APIs. + * This follows the same approach as Minimal APIs. * On the SignalR server, Hub method parameters of type `IAsyncEnumerable` and `ChannelReader` where `T` is a ValueType (`struct`) aren't supported. Using these types results in a runtime exception at startup in development and in the published app. For more information, see [SignalR: Using IAsyncEnumerable<T> and ChannelReader<T> with ValueTypes in native AOT (`dotnet/aspnetcore` #56179)](https://github.com/dotnet/aspnetcore/issues/56179). * [Strongly typed hubs](xref:signalr/hubs#strongly-typed-hubs) aren't supported with Native AOT (`PublishAot`). Using strongly typed hubs with Native AOT will result in warnings during build and publish, and a runtime exception. Using strongly typed hubs with trimming (`PublishedTrimmed`) is supported. * Only `Task`, `Task`, `ValueTask`, or `ValueTask` are supported for async return types. diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/status500.md b/aspnetcore/release-notes/aspnetcore-9/includes/status500.md index 06bea94e011b..a0fdf6f4c147 100644 --- a/aspnetcore/release-notes/aspnetcore-9/includes/status500.md +++ b/aspnetcore/release-notes/aspnetcore-9/includes/status500.md @@ -1,6 +1,6 @@ ### Added `InternalServerError` and `InternalServerError` to `TypedResults` -The class is a helpful vehicle for returning strongly-typed HTTP status code-based responses from a minimal API. `TypedResults` now includes factory methods and types for returning "500 Internal Server Error" responses from endpoints. Here's an example that returns a 500 response: +The class is a helpful vehicle for returning strongly-typed HTTP status code-based responses from a Minimal API. `TypedResults` now includes factory methods and types for returning "500 Internal Server Error" responses from endpoints. Here's an example that returns a 500 response: ```csharp var app = WebApplication.Create(); diff --git a/aspnetcore/security/anti-request-forgery.md b/aspnetcore/security/anti-request-forgery.md index f0c42c00909b..10b1985fc356 100644 --- a/aspnetcore/security/anti-request-forgery.md +++ b/aspnetcore/security/anti-request-forgery.md @@ -300,7 +300,7 @@ The antiforgery token is only validated if: ***Note:*** When enabled manually, the antiforgery middleware must run after the authentication and authorization middleware to prevent reading form data when the user is unauthenticated. -By default, minimal APIs that accept form data require antiforgery token validation. +By default, Minimal APIs that accept form data require antiforgery token validation. Consider the following `GenerateForm` method: diff --git a/aspnetcore/security/authentication/identity-api-authorization.md b/aspnetcore/security/authentication/identity-api-authorization.md index f1930e4b4dbd..75551c53e7a5 100644 --- a/aspnetcore/security/authentication/identity-api-authorization.md +++ b/aspnetcore/security/authentication/identity-api-authorization.md @@ -23,7 +23,7 @@ The steps shown in this article add authentication and authorization to an ASP.N * Isn't already configured for authentication. * Targets `net8.0` or later. -* Can be either minimal API or controller-based API. +* Can be either Minimal API or controller-based API. Some of the testing instructions in this article use the [Swagger UI](/aspnet/core/tutorials/web-api-help-pages-using-swagger) that's included with the project template. The Swagger UI isn't required to use Identity with a Web API backend. diff --git a/aspnetcore/test/http-files.md b/aspnetcore/test/http-files.md index 4b8be03e68be..29ca160669db 100644 --- a/aspnetcore/test/http-files.md +++ b/aspnetcore/test/http-files.md @@ -591,7 +591,7 @@ Right-click a request in **Endpoints Explorer** and select **Generate Request**. * If an `.http` file with the project name as the file name exists, the request is added to that file. * Otherwise, an `.http` file is created with the project name as the file name, and the request is added to that file. -The preceding screenshot shows endpoints defined by the minimal API project template. The following example shows the request that is generated for the selected endpoint: +The preceding screenshot shows endpoints defined by the Minimal API project template. The following example shows the request that is generated for the selected endpoint: ```http GET {{WebApplication1_HostAddress}}/weatherforecast/ diff --git a/aspnetcore/toc.yml b/aspnetcore/toc.yml index 5881c94e8cdb..ac38460d2ddb 100644 --- a/aspnetcore/toc.yml +++ b/aspnetcore/toc.yml @@ -877,7 +877,7 @@ items: items: - name: Overview uid: fundamentals/apis - - name: "Tutorial: Create a minimal API" + - name: "Tutorial: Create a Minimal API" uid: tutorials/min-web-api - name: Minimal APIs quick reference uid: fundamentals/minimal-apis diff --git a/aspnetcore/tutorials/first-web-api.md b/aspnetcore/tutorials/first-web-api.md index 171059bcce3f..57a8b89b0423 100644 --- a/aspnetcore/tutorials/first-web-api.md +++ b/aspnetcore/tutorials/first-web-api.md @@ -16,7 +16,7 @@ By [Tim Deschryver](https://timdeschryver.dev/) and [Rick Anderson](https://twit :::moniker range=">= aspnetcore-9.0" -This tutorial teaches the basics of building a controller-based web API that uses a database. Another approach to creating APIs in ASP.NET Core is to create *minimal APIs*. For help with choosing between minimal APIs and controller-based APIs, see . For a tutorial on creating a minimal API, see . +This tutorial teaches the basics of building a controller-based web API that uses a database. Another approach to creating APIs in ASP.NET Core is to create *Minimal APIs*. For help with choosing between Minimal APIs and controller-based APIs, see . For a tutorial on creating a Minimal API, see . ## Overview @@ -57,7 +57,7 @@ The following diagram shows the design of the app. * In the **Additional information** dialog: * Confirm the **Framework** is **.NET 9.0 (Standard Term Support)**. * Confirm the checkbox for **Enable OpenAPI support** is checked. - * Confirm the checkbox for **Use controllers (uncheck to use minimal APIs)** is checked. + * Confirm the checkbox for **Use controllers (uncheck to use Minimal APIs)** is checked. * Select **Create**. ## Add a NuGet package diff --git a/aspnetcore/tutorials/first-web-api/includes/first-web-api7.md b/aspnetcore/tutorials/first-web-api/includes/first-web-api7.md index aeb4afbc26c9..793618ba123f 100644 --- a/aspnetcore/tutorials/first-web-api/includes/first-web-api7.md +++ b/aspnetcore/tutorials/first-web-api/includes/first-web-api7.md @@ -1,6 +1,6 @@ :::moniker range="= aspnetcore-7.0" -This tutorial teaches the basics of building a controller-based web API that uses a database. Another approach to creating APIs in ASP.NET Core is to create *minimal APIs*. For help with choosing between minimal APIs and controller-based APIs, see . For a tutorial on creating a minimal API, see . +This tutorial teaches the basics of building a controller-based web API that uses a database. Another approach to creating APIs in ASP.NET Core is to create *Minimal APIs*. For help with choosing between Minimal APIs and controller-based APIs, see . For a tutorial on creating a Minimal API, see . ## Overview @@ -44,7 +44,7 @@ The following diagram shows the design of the app. * In the **Configure your new project dialog**, name the project *TodoApi* and select **Next**. * In the **Additional information** dialog: * Confirm the **Framework** is **.NET 8.0 (Long Term Support)**. - * Confirm the checkbox for **Use controllers(uncheck to use minimal APIs)** is checked. + * Confirm the checkbox for **Use controllers(uncheck to use Minimal APIs)** is checked. * Confirm the checkbox for **Enable OpenAPI support** is checked. * Select **Create**. diff --git a/aspnetcore/tutorials/first-web-api/includes/first-web-api8.md b/aspnetcore/tutorials/first-web-api/includes/first-web-api8.md index da3568a5baae..8f3ae64a935d 100644 --- a/aspnetcore/tutorials/first-web-api/includes/first-web-api8.md +++ b/aspnetcore/tutorials/first-web-api/includes/first-web-api8.md @@ -1,6 +1,6 @@ :::moniker range="= aspnetcore-8.0" -This tutorial teaches the basics of building a controller-based web API that uses a database. Another approach to creating APIs in ASP.NET Core is to create *minimal APIs*. For help with choosing between minimal APIs and controller-based APIs, see . For a tutorial on creating a minimal API, see . +This tutorial teaches the basics of building a controller-based web API that uses a database. Another approach to creating APIs in ASP.NET Core is to create *Minimal APIs*. For help with choosing between Minimal APIs and controller-based APIs, see . For a tutorial on creating a Minimal API, see . ## Overview @@ -40,7 +40,7 @@ The following diagram shows the design of the app. * In the **Configure your new project dialog**, name the project *TodoApi* and select **Next**. * In the **Additional information** dialog: * Confirm the **Framework** is **.NET 8.0 (Long Term Support)**. - * Confirm the checkbox for **Use controllers(uncheck to use minimal APIs)** is checked. + * Confirm the checkbox for **Use controllers(uncheck to use Minimal APIs)** is checked. * Confirm the checkbox for **Enable OpenAPI support** is checked. * Select **Create**. diff --git a/aspnetcore/tutorials/getting-started-with-swashbuckle/includes/getting-started-with-swashbuckle8.md b/aspnetcore/tutorials/getting-started-with-swashbuckle/includes/getting-started-with-swashbuckle8.md index 572832c222fc..96b099e5c695 100644 --- a/aspnetcore/tutorials/getting-started-with-swashbuckle/includes/getting-started-with-swashbuckle8.md +++ b/aspnetcore/tutorials/getting-started-with-swashbuckle/includes/getting-started-with-swashbuckle8.md @@ -63,7 +63,7 @@ Add the Swagger generator to the services collection in `Program.cs`: :::code language="csharp" source="~/tutorials/web-api-help-pages-using-swagger/samples/6.x/SwashbuckleSample/Snippets/Program.cs" id="snippet_ServicesDefault" highlight="3,4"::: -The call to shown in the preceding example is required only for [minimal APIs](/aspnet/core/fundamentals/apis). For more information, see [this StackOverflow post](https://stackoverflow.com/a/71933535). +The call to shown in the preceding example is required only for [Minimal APIs](/aspnet/core/fundamentals/apis). For more information, see [this StackOverflow post](https://stackoverflow.com/a/71933535). Enable the middleware for serving the generated JSON document and the Swagger UI, also in `Program.cs`: diff --git a/aspnetcore/tutorials/min-web-api.md b/aspnetcore/tutorials/min-web-api.md index 8c0be13400eb..b5f07a50c94c 100644 --- a/aspnetcore/tutorials/min-web-api.md +++ b/aspnetcore/tutorials/min-web-api.md @@ -1,7 +1,7 @@ --- -title: "Tutorial: Create a minimal API with ASP.NET Core" +title: "Tutorial: Create a Minimal API with ASP.NET Core" author: wadepickett -description: Learn how to build a minimal API with ASP.NET Core. +description: Learn how to build a Minimal API with ASP.NET Core. ms.author: wpickett ms.date: 07/29/2024 ms.custom: engagement-fy24 @@ -9,7 +9,7 @@ monikerRange: '>= aspnetcore-6.0' uid: tutorials/min-web-api --- -# Tutorial: Create a minimal API with ASP.NET Core +# Tutorial: Create a Minimal API with ASP.NET Core [!INCLUDE[](~/includes/not-latest-version.md)] @@ -20,7 +20,7 @@ By [Rick Anderson](https://twitter.com/RickAndMSFT) and [Tom Dykstra](https://gi Minimal APIs are architected to create HTTP APIs with minimal dependencies. They're ideal for microservices and apps that want to include only the minimum files, features, and dependencies in ASP.NET Core. -This tutorial teaches the basics of building a minimal API with ASP.NET Core. Another approach to creating APIs in ASP.NET Core is to use controllers. For help with choosing between minimal APIs and controller-based APIs, see . For a tutorial on creating an API project based on [controllers](xref:web-api/index) that contains more features, see [Create a web API](xref:tutorials/first-web-api). +This tutorial teaches the basics of building a Minimal API with ASP.NET Core. Another approach to creating APIs in ASP.NET Core is to use controllers. For help with choosing between Minimal APIs and controller-based APIs, see . For a tutorial on creating an API project based on [controllers](xref:web-api/index) that contains more features, see [Create a web API](xref:tutorials/first-web-api). ## Overview @@ -81,7 +81,7 @@ This tutorial creates the following API: * When a dialog box asks if you want to trust the authors, select **Yes**. * When a dialog box asks if you want to add required assets to the project, select **Yes**. - The preceding commands create a new web minimal API project and open it in Visual Studio Code. + The preceding commands create a new web Minimal API project and open it in Visual Studio Code. --- @@ -664,9 +664,9 @@ If you run into a problem you can't resolve, compare your code to the completed ## Next steps * [Configure JSON serialization options](xref:fundamentals/minimal-apis/responses#configure-json-serialization-options). -* Handle errors and exceptions: The [developer exception page](xref:fundamentals/error-handling-api#developer-exception-page) is enabled by default in the development environment for minimal API apps. For information about how to handle errors and exceptions, see [Handle errors in ASP.NET Core APIs](xref:fundamentals/error-handling-api). -* For an example of testing a minimal API app, see [this GitHub sample](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample). -* [OpenAPI support in minimal APIs](xref:fundamentals/openapi/aspnetcore-openapi). +* Handle errors and exceptions: The [developer exception page](xref:fundamentals/error-handling-api#developer-exception-page) is enabled by default in the development environment for Minimal API apps. For information about how to handle errors and exceptions, see [Handle errors in ASP.NET Core APIs](xref:fundamentals/error-handling-api). +* For an example of testing a Minimal API app, see [this GitHub sample](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample). +* [OpenAPI support in Minimal APIs](xref:fundamentals/openapi/aspnetcore-openapi). * [Quickstart: Publish to Azure](/azure/app-service/quickstart-dotnetcore). * [Organizing ASP.NET Core Minimal APIs](https://www.tessferrandez.com/blog/2023/10/31/organizing-minimal-apis.html). diff --git a/aspnetcore/tutorials/min-web-api/includes/min-web-api6-7.md b/aspnetcore/tutorials/min-web-api/includes/min-web-api6-7.md index 59947234812b..273cf337f49e 100644 --- a/aspnetcore/tutorials/min-web-api/includes/min-web-api6-7.md +++ b/aspnetcore/tutorials/min-web-api/includes/min-web-api6-7.md @@ -2,7 +2,7 @@ Minimal APIs are architected to create HTTP APIs with minimal dependencies. They are ideal for microservices and apps that want to include only the minimum files, features, and dependencies in ASP.NET Core. -This tutorial teaches the basics of building a minimal API with ASP.NET Core. Another approach to creating APIs in ASP.NET Core is to use controllers. For help in choosing between minimal APIs and controller-based APIs, see . For a tutorial on creating an API project based on [controllers](xref:web-api/index) that contains more features, see [Create a web API](xref:tutorials/first-web-api). +This tutorial teaches the basics of building a Minimal API with ASP.NET Core. Another approach to creating APIs in ASP.NET Core is to use controllers. For help in choosing between Minimal APIs and controller-based APIs, see . For a tutorial on creating an API project based on [controllers](xref:web-api/index) that contains more features, see [Create a web API](xref:tutorials/first-web-api). ## Overview @@ -63,7 +63,7 @@ This tutorial creates the following API: * When a dialog box asks if you want to trust the authors, select **Yes**. * When a dialog box asks if you want to add required assets to the project, select **Yes**. - The preceding commands create a new web minimal API project and open it in Visual Studio Code. + The preceding commands create a new web Minimal API project and open it in Visual Studio Code. --- @@ -441,9 +441,9 @@ If you run into a problem you can't resolve, compare your code to the completed ## Next steps * [Configure JSON serialization options](xref:fundamentals/minimal-apis/responses#configure-json-serialization-options). -* Handle errors and exceptions: The [developer exception page](xref:fundamentals/error-handling-api#developer-exception-page) is enabled by default in the development environment for minimal API apps. For information about how to handle errors and exceptions, see [Handle errors in ASP.NET Core APIs](xref:fundamentals/error-handling-api). -* For an example of testing a minimal API app, see [this GitHub sample](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample). -* [OpenAPI support in minimal APIs](xref:fundamentals/openapi/aspnetcore-openapi). +* Handle errors and exceptions: The [developer exception page](xref:fundamentals/error-handling-api#developer-exception-page) is enabled by default in the development environment for Minimal API apps. For information about how to handle errors and exceptions, see [Handle errors in ASP.NET Core APIs](xref:fundamentals/error-handling-api). +* For an example of testing a Minimal API app, see [this GitHub sample](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample). +* [OpenAPI support in Minimal APIs](xref:fundamentals/openapi/aspnetcore-openapi). * [Quickstart: Publish to Azure](/azure/app-service/quickstart-dotnetcore). * [Organizing ASP.NET Core Minimal APIs](https://www.tessferrandez.com/blog/2023/10/31/organizing-minimal-apis.html). @@ -457,7 +457,7 @@ See Minimal APIs are architected to create HTTP APIs with minimal dependencies. They are ideal for microservices and apps that want to include only the minimum files, features, and dependencies in ASP.NET Core. -This tutorial teaches the basics of building a minimal API with ASP.NET Core. Another approach to creating APIs in ASP.NET Core is to use controllers. For help in choosing between minimal APIs and controller-based APIs, see . For a tutorial on creating an API project based on [controllers](xref:web-api/index) that contains more features, see [Create a web API](xref:tutorials/first-web-api). +This tutorial teaches the basics of building a Minimal API with ASP.NET Core. Another approach to creating APIs in ASP.NET Core is to use controllers. For help in choosing between Minimal APIs and controller-based APIs, see . For a tutorial on creating an API project based on [controllers](xref:web-api/index) that contains more features, see [Create a web API](xref:tutorials/first-web-api). ## Overview @@ -516,7 +516,7 @@ This tutorial creates the following API: * When a dialog box asks if you want to trust the authors, select **Yes**. * When a dialog box asks if you want to add required assets to the project, select **Yes**. - The preceding commands create a new web minimal API project and open it in Visual Studio Code. + The preceding commands create a new web Minimal API project and open it in Visual Studio Code. --- @@ -829,9 +829,9 @@ Replace the contents of the `Program.cs` file with the following code to use thi Verify you can post and get all fields except the secret field. -## Test minimal API +## Test Minimal API -For an example of testing a minimal API app, see [this GitHub sample](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample). +For an example of testing a Minimal API app, see [this GitHub sample](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample). ## Publish to Azure diff --git a/aspnetcore/tutorials/min-web-api/includes/min-web-api8.md b/aspnetcore/tutorials/min-web-api/includes/min-web-api8.md index c3e3d2a2b371..d5773f70cfa5 100644 --- a/aspnetcore/tutorials/min-web-api/includes/min-web-api8.md +++ b/aspnetcore/tutorials/min-web-api/includes/min-web-api8.md @@ -2,7 +2,7 @@ Minimal APIs are architected to create HTTP APIs with minimal dependencies. They're ideal for microservices and apps that want to include only the minimum files, features, and dependencies in ASP.NET Core. -This tutorial teaches the basics of building a minimal API with ASP.NET Core. Another approach to creating APIs in ASP.NET Core is to use controllers. For help with choosing between minimal APIs and controller-based APIs, see . For a tutorial on creating an API project based on [controllers](xref:web-api/index) that contains more features, see [Create a web API](xref:tutorials/first-web-api). +This tutorial teaches the basics of building a Minimal API with ASP.NET Core. Another approach to creating APIs in ASP.NET Core is to use controllers. For help with choosing between Minimal APIs and controller-based APIs, see . For a tutorial on creating an API project based on [controllers](xref:web-api/index) that contains more features, see [Create a web API](xref:tutorials/first-web-api). ## Overview @@ -63,7 +63,7 @@ This tutorial creates the following API: * When a dialog box asks if you want to trust the authors, select **Yes**. * When a dialog box asks if you want to add required assets to the project, select **Yes**. - The preceding commands create a new web minimal API project and open it in Visual Studio Code. + The preceding commands create a new web Minimal API project and open it in Visual Studio Code. --- @@ -642,9 +642,9 @@ If you run into a problem you can't resolve, compare your code to the completed ## Next steps * [Configure JSON serialization options](xref:fundamentals/minimal-apis/responses#configure-json-serialization-options). -* Handle errors and exceptions: The [developer exception page](xref:fundamentals/error-handling-api#developer-exception-page) is enabled by default in the development environment for minimal API apps. For information about how to handle errors and exceptions, see [Handle errors in ASP.NET Core APIs](xref:fundamentals/error-handling-api). -* For an example of testing a minimal API app, see [this GitHub sample](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample). -* [OpenAPI support in minimal APIs](xref:fundamentals/openapi/aspnetcore-openapi). +* Handle errors and exceptions: The [developer exception page](xref:fundamentals/error-handling-api#developer-exception-page) is enabled by default in the development environment for Minimal API apps. For information about how to handle errors and exceptions, see [Handle errors in ASP.NET Core APIs](xref:fundamentals/error-handling-api). +* For an example of testing a Minimal API app, see [this GitHub sample](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample). +* [OpenAPI support in Minimal APIs](xref:fundamentals/openapi/aspnetcore-openapi). * [Quickstart: Publish to Azure](/azure/app-service/quickstart-dotnetcore). * [Organizing ASP.NET Core Minimal APIs](https://www.tessferrandez.com/blog/2023/10/31/organizing-minimal-apis.html). diff --git a/aspnetcore/tutorials/publish-to-azure-api-management-using-vs.md b/aspnetcore/tutorials/publish-to-azure-api-management-using-vs.md index f657034c35bb..4d812a1ada89 100644 --- a/aspnetcore/tutorials/publish-to-azure-api-management-using-vs.md +++ b/aspnetcore/tutorials/publish-to-azure-api-management-using-vs.md @@ -29,7 +29,7 @@ Visual Studio allows you to easily create a new ASP.NET Core web API project fro * In the **Configure your new project dialog**, name the project **WeatherAPI** and select **Next**. * In the **Additional information** dialog: * Confirm the Framework is **.NET 6.0 (Long-term support)**. -* Confirm the checkbox for **Use controllers (uncheck to use minimal APIs)** is checked. +* Confirm the checkbox for **Use controllers (uncheck to use Minimal APIs)** is checked. * Confirm the checkbox for **Enable OpenAPI support** is checked. * Select **Create**. diff --git a/aspnetcore/web-api/index.md b/aspnetcore/web-api/index.md index d088754f67ec..e499142bcc09 100644 --- a/aspnetcore/web-api/index.md +++ b/aspnetcore/web-api/index.md @@ -12,7 +12,7 @@ uid: web-api/index :::moniker range=">= aspnetcore-7.0" -ASP.NET Core supports creating web APIs using controllers or using minimal APIs. *Controllers* in a web API are classes that derive from . Controllers are activated and disposed on a per request basis. +ASP.NET Core supports creating web APIs using controllers or using Minimal APIs. *Controllers* in a web API are classes that derive from . Controllers are activated and disposed on a per request basis. This article shows how to use controllers for handling web API requests. For information on creating web APIs without controllers, see . @@ -317,7 +317,7 @@ The `[Consumes]` attribute is applied to both actions. The `PostJson` action han :::moniker range="= aspnetcore-6.0" -ASP.NET Core supports creating web APIs using controllers or using minimal APIs. *Controllers* in a web API are classes that derive from . This article shows how to use controllers for handling web API requests. For information on creating web APIs without controllers, see . +ASP.NET Core supports creating web APIs using controllers or using Minimal APIs. *Controllers* in a web API are classes that derive from . This article shows how to use controllers for handling web API requests. For information on creating web APIs without controllers, see . ## ControllerBase class