Apply suggestions from PR review
Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>pull/33773/head
parent
b4c1d2788c
commit
8c6a20e7bf
|
@ -328,14 +328,13 @@ If an endpoint can return different response types in different scenarios, you c
|
|||
|
||||
#### Excluding endpoints from the generated document
|
||||
|
||||
By default, all endpoints that are defined in an app are documented in the generated OpenAPI file,
|
||||
but endpoints can be excluded from the document using attributes or extension methods.
|
||||
By default, all endpoints that are defined in an app are documented in the generated OpenAPI file, but endpoints can be excluded from the document using attributes or extension methods.
|
||||
|
||||
The mechanism for specifying an endpoint should be excluded depends on the type of app being developed.
|
||||
The mechanism for specifying an endpoint that should be excluded depends on the type of app being developed.
|
||||
|
||||
##### [Minimal APIs](#tab/minimal-apis)
|
||||
|
||||
Minimal APIs support two strategies for excluding a given endpoint from the OpenAPI document, using:
|
||||
Minimal APIs support two strategies for excluding a given endpoint from the OpenAPI document:
|
||||
|
||||
* <xref:Microsoft.AspNetCore.Http.OpenApiRouteHandlerBuilderExtensions.ExcludeFromDescription%2A>
|
||||
* <xref:Microsoft.AspNetCore.Routing.ExcludeFromDescriptionAttribute>
|
||||
|
@ -355,7 +354,7 @@ app.MapGet("/attributes",
|
|||
|
||||
In controller-based apps, the <xref:Microsoft.AspNetCore.Mvc.ApiExplorerSettingsAttribute> attribute can be used to exclude an endpoint from the OpenAPI document.
|
||||
|
||||
The following example demonstrates how to exclude an endpoint from the generated OpenAPI document.
|
||||
The following example demonstrates how to exclude an endpoint from the generated OpenAPI document:
|
||||
|
||||
```csharp
|
||||
[HttpGet("/private")]
|
||||
|
|
Loading…
Reference in New Issue