Skip to content

Commit dfc14e7

Browse files
authored
Updates
1 parent 0d91dad commit dfc14e7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

aspnetcore/fundamentals/openapi/includes/include-metadata9.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
:::moniker range="= aspnetcore-9.0"
22

33
ASP.NET collects metadata from the web app's endpoints and uses it to generate an OpenAPI document.
4-
In controller-based apps, metadata is collected from attributes like [`[EndpointDescription]`](xref:Microsoft.AspNetCore.Http.EndpointDescriptionAttribute), [`[HttpPost]`](xref:Microsoft.AspNetCore.Mvc.HttpPostAttribute),
5-
and [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute).
6-
In minimal APIs, metadata can be collected from attributes, but may also be set by using extension methods
7-
and other strategies, such as returning <xref:Microsoft.AspNetCore.Http.TypedResults> from route handlers.
4+
5+
In controller-based apps, metadata is collected from attributes such as [`[EndpointDescription]`](xref:Microsoft.AspNetCore.Http.EndpointDescriptionAttribute), [`[HttpPost]`](xref:Microsoft.AspNetCore.Mvc.HttpPostAttribute),
6+
and [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) when the controller has the [`[ApiController]` attribute](xref:Microsoft.AspNetCore.Mvc.ApiControllerAttribute).
7+
8+
In minimal APIs, metadata can be collected from attributes but may also be set by using extension methods and other strategies, such as returning <xref:Microsoft.AspNetCore.Http.TypedResults> from route handlers.
9+
810
The following table provides an overview of the metadata collected and the strategies for setting it.
911

1012
| Metadata | Attribute | Extension method | Other strategies |
@@ -582,4 +584,4 @@ A schema transformer can be used to override any default metadata or add additio
582584
* <xref:fundamentals/openapi/using-openapi-documents>
583585
* [OpenAPI specification](https://spec.openapis.org/oas/v3.0.3)
584586

585-
:::moniker-end
587+
:::moniker-end

0 commit comments

Comments
 (0)