Skip to content

Commit b584249

Browse files
Apply suggestions from PR review
Co-authored-by: Tom Dykstra <[email protected]>
1 parent 578990b commit b584249

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

aspnetcore/fundamentals/openapi/aspnetcore-openapi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ builder.Services.AddOpenApi("v1");
131131
builder.Services.AddOpenApi("v2");
132132
```
133133

134-
Each invocation of <xref:Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi%2A> can specify its own set of options, so that you can choose to use the same or different transformers / customizations for each OpenApi document.
134+
Each invocation of <xref:Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi%2A> can specify its own set of options, so that you can choose to use the same or different customizations for each OpenAPI document.
135135

136136
The framework uses the <xref:Microsoft.AspNetCore.OpenApi.OpenApiOptions.ShouldInclude> delegate method of <xref:Microsoft.AspNetCore.OpenApi.OpenApiOptions> to determine which endpoints to include in each document.
137137

138-
For each document, the <xref:Microsoft.AspNetCore.OpenApi.OpenApiOptions.ShouldInclude> delegate method is called for each endpoint in the application, passing the <xref:Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription> object for the endpoint. The method should return a boolean value indicating whether the endpoint should be included in the document. The <xref:Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription> object contains information about the endpoint, such as the HTTP method, route, and response types, as well as metadata attached to the endpoint via attributes or extension methods.
138+
For each document, the <xref:Microsoft.AspNetCore.OpenApi.OpenApiOptions.ShouldInclude> delegate method is called for each endpoint in the application, passing the <xref:Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription> object for the endpoint. The method returns a boolean value indicating whether the endpoint should be included in the document. The <xref:Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription> object contains information about the endpoint, such as the HTTP method, route, and response types, as well as metadata attached to the endpoint via attributes or extension methods.
139139

140140
The default implementation of this delegate uses the <xref:Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription.GroupName> field of <xref:Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription>, which is set on an endpoint using either the <xref:Microsoft.AspNetCore.Builder.RoutingEndpointConventionBuilderExtensions.WithGroupName%2A> extension method or the <xref:Microsoft.AspNetCore.Routing.EndpointGroupNameAttribute> attribute, to determine which endpoints to include in the document.
141141

aspnetcore/fundamentals/openapi/customize-openapi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ After all transformers have been applied, the framework makes a pass over the do
109109
to the `components.schemas` section, replacing them with `$ref` references to the transferred schema.
110110
This reduces the size of the document and makes it easier to read.
111111

112-
The details of this processing are a bit complicated, and might change in future versions of .NET, but in general:
112+
The details of this processing are complicated and might change in future versions of .NET, but in general:
113113

114114
* Schemas for class/record/struct types are replaced with a `$ref` to a schema in `components.schemas`
115115
if they appear more than once in the document.
116116
* Schemas for primitive types and standard collections are left inline.
117-
* Schemas for enum types are always replaced with a `$ref` to a schema in to components.schemas.
117+
* Schemas for enum types are always replaced with a `$ref` to a schema in components.schemas.
118118

119119
Typically the name of the schema in `components.schemas` is the name of the class/record/struct type,
120120
but in some circumstances a different name must be used.
@@ -128,7 +128,7 @@ that uses the name of the type, but you can replace it with your own implementat
128128

129129
As a simple example of this customization, you might choose to always inline enum schemas.
130130
This is done by setting <xref:Microsoft.AspNetCore.OpenApi.OpenApiOptions.CreateSchemaReferenceId> to a delegate
131-
that returns null for enum types, and otherwise returns value from the default implementation.
131+
that returns null for enum types, and otherwise returns the value from the default implementation.
132132
The following code shows how to do this:
133133

134134
```csharp

0 commit comments

Comments
 (0)