diff --git a/aspnetcore/release-notes/aspnetcore-10.0.md b/aspnetcore/release-notes/aspnetcore-10.0.md
index c3927a3fd154..f37174acaf77 100644
--- a/aspnetcore/release-notes/aspnetcore-10.0.md
+++ b/aspnetcore/release-notes/aspnetcore-10.0.md
@@ -33,6 +33,10 @@ This section describes new features for minimal APIs.
This section describes new features for OpenAPI.
+[!INCLUDE[](~/release-notes/aspnetcore-10/includes/openApi.md)]
+
+[!INCLUDE[](~/release-notes/aspnetcore-10/includes/responseDescProducesResponseType.md)]
+
## Authentication and authorization
This section describes new features for authentication and authorization.
@@ -41,4 +45,6 @@ This section describes new features for authentication and authorization.
This section describes miscellaneous new features in ASP.NET Core 10.0.
+[!INCLUDE[](~/release-notes/aspnetcore-10/includes/testAppsTopLevel.md)]
+
## Related content
diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/openApi.md b/aspnetcore/release-notes/aspnetcore-10/includes/openApi.md
index 13ab72d7e097..b46662ac2c55 100644
--- a/aspnetcore/release-notes/aspnetcore-10/includes/openApi.md
+++ b/aspnetcore/release-notes/aspnetcore-10/includes/openApi.md
@@ -1,8 +1,5 @@
### OpenAPI 3.1 support
-https://github.com/dotnet/aspnetcore/pull/59480
-https://github.com/dotnet/aspnetcore/pull/60002
-
ASP.NET Core has added support for generating [OpenAPI version 3.1] documents in .NET 10.
Despite the minor version bump, OpenAPI 3.1 is a significant update to the OpenAPI specification,
in particular with full support for [JSON Schema draft 2020-12].
@@ -11,11 +8,11 @@ in particular with full support for [JSON Schema draft 2020-12].
[JSON Schema draft 2020-12]: https://json-schema.org/specification-links#2020-12
Some of the changes you will see in the generated OpenAPI document include:
-- Nullable types will no longer have the `nullable: true` property in the schema, and instead will have a `type` keyword whose value is an array that includes `null` as one of the types.
-With this feature, the default OpenAPI version for generated documents will be 3.1, but you can easily change this
-by explicitly setting the `OpenApiVersion` property of the `OpenApiOptions` in the `configureOptions` delegate
-parameter of `AddOpenApi`.
+- Nullable types no longer have the `nullable: true` property in the schema.
+- Instead of a `nullable: true` property, they have a `type` keyword whose value is an array that includes `null` as one of the types.
+
+With this feature, the default OpenAPI version for generated documents is`3.1`. The version can be changed by explicitly setting the [OpenApiVersion](/dotnet/api/microsoft.aspnetcore.openapi.openapioptions.openapiversion) property of the [OpenApiOptions](/dotnet/api/microsoft.aspnetcore.openapi.openapioptions) in the `configureOptions` delegate parameter of [AddOpenApi](/dotnet/api/microsoft.extensions.dependencyinjection.openapiservicecollectionextensions.addopenapi).
```csharp
builder.Services.AddOpenApi(options =>
@@ -25,21 +22,20 @@ builder.Services.AddOpenApi(options =>
});
```
-If you are generating the OpenAPI document at build time, you can select the OpenAPI version by setting the `--openapi-version` in the `OpenApiGenerateDocumentsOptions` MSBuild item.
+When generating the OpenAPI document at build time, the OpenAPI version can be selected by setting the `--openapi-version` in the `OpenApiGenerateDocumentsOptions` MSBuild item.
```xml
--openapi-version OpenApi3_0
```
-### Breaking changes
+OpenAPI 3.1 support was primarly added in the following [PR](https://github.com/dotnet/aspnetcore/pull/59480).
+
+### OpenAPI 3.1 breaking changes
+
+Support for OpenAPI 3.1 requires an update to the underlying OpenAPI.NET library to a new major version, 2.0. This new version has some breaking changes from the previous version. The breaking changes may impact apps if they have any document, operation, or schema transformers.
-Support for OpenAPI 3.1 requires an update to the underlying OpenAPI.NET library to a new major version, 2.0.
-This new version has some breaking changes from the previous version, and this may impact your applications
-if you have any document, operation, or schema transformers.
-Perhaps the most significant change is that the `OpenApiAny` class has been dropped in favor of using `JsonNode` directly.
-If your transformers use `OpenApiAny`, you will need to update them to use `JsonNode` instead.
-For example, a schema transformer to add an example in .NET 9 might look like this:
+One of the most significant changes is that the `OpenApiAny` class has been dropped in favor of using `JsonNode` directly. Transformers that use `OpenApiAny` need to be updated to use `JsonNode`. For example, a schema transformer to add an example in .NET 9 might look like the following code:
```csharp
options.AddSchemaTransformer((schema, context, cancellationToken) =>
@@ -58,7 +54,7 @@ For example, a schema transformer to add an example in .NET 9 might look like th
});
```
-In .NET 10 the transformer to do the same task will look like this:
+In .NET 10 the transformer to do the same task will look like the following code:
```csharp
options.AddSchemaTransformer((schema, context, cancellationToken) =>
@@ -77,22 +73,45 @@ In .NET 10 the transformer to do the same task will look like this:
});
```
-Note that these changes will be necessary even if you congfigure the OpenAPI version to 3.0.
+The following example shows the changes in diff format.
-### OpenAPI in Yaml
+```diff
+options.AddSchemaTransformer((schema, context, cancellationToken) =>
+{
+ if (context.JsonTypeInfo.Type == typeof(WeatherForecast))
+ {
+- schema.Example = new OpenApiObject
++ schema.Example = new JsonObject
+ {
+- ["date"] = new OpenApiString(DateTime.Now.AddDays(1).ToString("yyyy-MM-dd")),
++ ["date"] = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"),
+- ["temperatureC"] = new OpenApiInteger(0),
++ ["temperatureC"] = 0,
+- ["temperatureF"] = new OpenApiInteger(32),
++ ["temperatureF"] = 32,
+- ["summary"] = new OpenApiString("Bracing"),
++ []"summary"] = "Bracing",
+ };
+ }
+ return Task.CompletedTask;
+});
+```
-https://github.com/dotnet/aspnetcore/pull/58616
+Note that these changes are necessary even when only congfiguring the OpenAPI version to 3.0.
-ASP.NET now supports serving the generated OpenAPI document in YAML format.
-YAML can be more concise than JSON, eliminating curly braces and quotation marks when these can be inferred.
-YAML also supports multi-line strings, which can be useful for long descriptions.
+### OpenAPI in Yaml
-To configure your application to serve the generated OpenAPI document in YAML format,
-specify the endpoint in the MapOpenApi call with a ".yaml" or ".yml" suffix, as shown in this example:
+ASP.NET now supports serving the generated OpenAPI document in YAML format. YAML can be more concise than JSON, eliminating curly braces and quotation marks when these can be inferred. YAML also supports multi-line strings, which can be useful for long descriptions.
+
+To configure an app to serve the generated OpenAPI document in YAML format, specify the endpoint in the MapOpenApi call with a ".yaml" or ".yml" suffix, as shown in the following example:
```csharp
app.MapOpenApi("/openapi/{documentName}.yaml");
```
-Support for YAML is currently only available for the the OpenAPI served from the OpenAPI endpoint.
-Support for generating OpenAPI documents in YAML format at build time will be added in a future preview.
+Support for:
+
+- YAML is currently only available for the the OpenAPI served from the OpenAPI endpoint.
+- Generating OpenAPI documents in YAML format at build time isadded in a future preview.
+
+See [this PR](https://github.com/dotnet/aspnetcore/pull/58616) which added support for serving the generated OpenAPI document in YAML format.
\ No newline at end of file
diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/responseDescProducesResponseType.md b/aspnetcore/release-notes/aspnetcore-10/includes/responseDescProducesResponseType.md
index 3dd6d3874773..c9602f685f2d 100644
--- a/aspnetcore/release-notes/aspnetcore-10/includes/responseDescProducesResponseType.md
+++ b/aspnetcore/release-notes/aspnetcore-10/includes/responseDescProducesResponseType.md
@@ -1,8 +1,6 @@
### Response description on ProducesResponseType
-https://github.com/dotnet/aspnetcore/pull/58193
-
-The ProducesAttribute, ProducesResponseTypeAttribute, and ProducesDefaultResponseType attributes now accept an optional string parameter, `Description`, that will set the description of the response. Here's an example:
+The [ProducesAttribute](/dotnet/api/microsoft.aspnetcore.mvc.producesattribute-1), [ProducesResponseTypeAttribute](/dotnet/api/microsoft.aspnetcore.mvc.producesresponsetypeattribute-1), and [ProducesDefaultResponseType](/dotnet/api/microsoft.aspnetcore.mvc.producesdefaultresponsetypeattribute) attributes now accept an optional string parameter, `Description`, that will set the description of the response. Here's an example:
```csharp
[HttpGet(Name = "GetWeatherForecast")]
@@ -11,7 +9,7 @@ public IEnumerable Get()
{
```
-And the generated OpenAPI will be
+And the generated OpenAPI:
```json
"responses": {
@@ -20,4 +18,4 @@ And the generated OpenAPI will be
"content": {
```
-Community contribution! 🙏
\ No newline at end of file
+[Community contribution](https://github.com/dotnet/aspnetcore/pull/58193) by [Sander ten Brinke](https://github.com/sander1095) 🙏
diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/testAppsTopLevel.md b/aspnetcore/release-notes/aspnetcore-10/includes/testAppsTopLevel.md
index 7894fdd0c15e..ae0911efb145 100644
--- a/aspnetcore/release-notes/aspnetcore-10/includes/testAppsTopLevel.md
+++ b/aspnetcore/release-notes/aspnetcore-10/includes/testAppsTopLevel.md
@@ -1,17 +1,12 @@
## Better support for testing apps with top-level statements
-https://github.com/dotnet/aspnetcore/pull/58199
-https://github.com/dotnet/aspnetcore/pull/58482
+.NET 10 now has better support for testing apps that use top-level statements. Previously developers had to manually add `public partial class Program` to the `Program.cs` file so that the test project could reference the `Program class`. This is because the top-level statement feature in C# 9 generated a `Program class` that was declared as internal.
-.NET 10 now has better support for testing apps that use top-level statements.
-Previously developers had to manually add `public partial class Program` to the
-Program.cs file so that the test project could reference the Program class.
-This is because the top-level statement feature in C# 9 generated a Program class
-that was declared as internal.
+In .NET 10, a source generator is used to generate the `public partial class Program` declaration if the programmer did not declare it explicitly. In addition, an analyzer was added to detect when `public partial class Program` is declared explicitly and advise the developer to remove it.
-In .NET 10, a source generator is used to generate the `public partial class Program`
-declaration if the programmer did not declare it explicitly. In addition, an analyzer
-was added to detect when `public partial class Program` is declared explicitly and
-advise the developer to remove it.
+
-
\ No newline at end of file
+The following PRs contribited to this feature:
+
+- [PR 58199](https://github.com/dotnet/aspnetcore/pull/58199)
+- [PR 58482](https://github.com/dotnet/aspnetcore/pull/58482)
\ No newline at end of file