Skip to content

Commit f9334b3

Browse files
authored
Fixup OpenAPI content in Whats New doc (#33999)
* Fixup OpenAPI content in Whats New doc * Address comments from PR review
1 parent db7227f commit f9334b3

File tree

6 files changed

+13
-54
lines changed

6 files changed

+13
-54
lines changed

aspnetcore/release-notes/aspnetcore-9.0.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,8 @@ This section describes new features for OpenAPI
4545

4646
[!INCLUDE[](~/release-notes/aspnetcore-9/includes/openApi.md)]
4747

48-
[!INCLUDE[](~/release-notes/aspnetcore-9/includes/openAPI_completion.md)]
49-
50-
[!INCLUDE[](~/release-notes/aspnetcore-9/includes/transformer-registration.md)]
51-
5248
[!INCLUDE[](~/release-notes/aspnetcore-9/includes/openapi-aot.md)]
5349

54-
[!INCLUDE[](~/release-notes/aspnetcore-9/includes/prob_validation.md)]
55-
5650
## Authentication and authorization
5751

5852
This section describes new features for authentication and authorization.

aspnetcore/release-notes/aspnetcore-9/includes/openApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Built-in support for OpenAPI document generation
22

3-
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 Preview, 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.
3+
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.
44

55
The following highlighted code calls:
66

@@ -25,14 +25,14 @@ OpenAPI documents can also be generated at build-time by adding the [`Microsoft.
2525
dotnet add package Microsoft.Extensions.ApiDescription.Server --prerelease
2626
```
2727

28-
In the app's project file, add the following:
28+
To modify the location of the emitted OpenAPI documents, set the target path in the OpenApiDocumentsDirectory property in the app's project file:
2929

30-
:::code language="xml" source="~/release-notes/aspnetcore-9/samples/OpenApiExample/OpenApiExample.csproj" range="9-12":::
30+
:::code language="xml" source="~/release-notes/aspnetcore-9/samples/OpenApiExample/OpenApiExample.csproj" range="9-11":::
3131

3232
Run `dotnet build` and inspect the generated JSON file in the project directory.
3333

3434
![OpenAPI document generation at build-time](~/release-notes/aspnetcore-9/_static/openapidoc2.png)
3535

36-
ASP.NET Core's built-in OpenAPI document generation provides support for various customizations and options. It provides document and operation transformers and has the ability to manage multiple OpenAPI documents for the same application.
36+
ASP.NET Core's built-in OpenAPI document generation provides support for various customizations and options. It provides document, operation, and schema transformers and has the ability to manage multiple OpenAPI documents for the same application.
3737

3838
To learn more about ASP.NET Core's new OpenAPI document capabilities, see [the new Microsoft.AspNetCore.OpenApi docs](https://aka.ms/aspnet/openapi).

aspnetcore/release-notes/aspnetcore-9/includes/prob_validation.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

aspnetcore/release-notes/aspnetcore-9/includes/produces-problem.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ app.Run();
1515

1616
record Todo(int Id, string Title, boolean IsCompleted);
1717
```
18+
19+
### `Problem` and `ValidationProblem` result types support construction with `IEnumerable<KeyValuePair<string, object?>>` values
20+
21+
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<string, object?>`. In this release, these construction APIs support overloads that consume `IEnumerable<KeyValuePair<string, object?>>`.
22+
23+
:::code language="csharp" source="~/fundamentals/openapi/samples/9.x/ProducesProblem/Program.cs" id="snippet_2" :::
24+
25+
Thanks to GitHub user [joegoldman2](https://github.com/joegoldman2) for this contribution!

aspnetcore/release-notes/aspnetcore-9/includes/transformer-registration.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

aspnetcore/release-notes/aspnetcore-9/samples/OpenApiExample/OpenApiExample.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88

99
<PropertyGroup>
1010
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
11-
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
1211
</PropertyGroup>
13-
12+
1413
<ItemGroup>
1514
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0-preview.5" />
1615
</ItemGroup>

0 commit comments

Comments
 (0)