Skip to content

Commit 11722f3

Browse files
Copilotwadepickett
andauthored
Fix property name for Open API document generation (#37556)
* Initial plan * Correct OpenApiGenerateDocuments to OpenApiGenerateDocumentsOnBuild for build-time generation Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> * Update ms.date in OpenAPI using docs article Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> * Update overview.md ms.date to current date Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
1 parent 0d017e7 commit 11722f3

10 files changed

Lines changed: 12 additions & 12 deletions

File tree

aspnetcore/fundamentals/openapi/includes/overview-9.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ To learn more about the `Microsoft.AspNetCore.OpenApi` package, see <xref:fundam
3939
The [`Microsoft.Extensions.ApiDescription.Server`](https://www.nuget.org/packages/Microsoft.Extensions.ApiDescription.Server/) package provides support for generating OpenAPI documents at build time and serializing them.
4040

4141
To use `Microsoft.Extensions.ApiDescription.Server`, add it as a PackageReference to a project file.
42-
Document generation at build time is enabled by setting the `OpenApiGenerateDocuments` property.
42+
Document generation at build time is enabled by setting the `OpenApiGenerateDocumentsOnBuild` property to `true`.
4343
By default, the generated OpenAPI document is saved to the `obj` directory, but you can customize
4444
the output directory by setting the `OpenApiDocumentsDirectory` property.
4545

aspnetcore/fundamentals/openapi/includes/using-openapi-documents-9.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Enable document generation at build time by setting the following properties in
5454
```xml
5555
<PropertyGroup>
5656
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
57-
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
57+
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
5858
</PropertyGroup>
5959
```
6060

aspnetcore/fundamentals/openapi/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Learn how to integrate OpenAPI in ASP.NET Core API apps. Discover f
66
monikerRange: '>= aspnetcore-6.0'
77
ms.author: wpickett
88
ms.reviewer: wpickett
9-
ms.date: 03/20/2026
9+
ms.date: 08/28/2026
1010
uid: fundamentals/openapi/overview
1111
---
1212
# OpenAPI support in ASP.NET Core API apps
@@ -53,7 +53,7 @@ To learn more about the `Microsoft.AspNetCore.OpenApi` package, see <xref:fundam
5353
The [`Microsoft.Extensions.ApiDescription.Server`](https://www.nuget.org/packages/Microsoft.Extensions.ApiDescription.Server/) package supports generating OpenAPI documents at build time and serializing them.
5454

5555
To use `Microsoft.Extensions.ApiDescription.Server`, add it as a PackageReference to a project file.
56-
Enable document generation at build time by setting the `OpenApiGenerateDocuments` property.
56+
Enable document generation at build time by setting the `OpenApiGenerateDocumentsOnBuild` property to `true`.
5757
By default, the generated OpenAPI document is saved to the `obj` directory, but you can customize
5858
the output directory by setting the `OpenApiDocumentsDirectory` property.
5959

aspnetcore/fundamentals/openapi/samples/10.x/WebAppOpenAPI10/WebAppOpenAPI10.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFramework>net10.0</TargetFramework>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
8-
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
8+
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
99
<!-- Configure build-time OpenAPI generation to produce an OpenAPI 3.1 document. -->
1010
<OpenApiGenerateDocumentsOptions>--openapi-version OpenApi3_1</OpenApiGenerateDocumentsOptions>
1111
</PropertyGroup>

aspnetcore/fundamentals/openapi/samples/10.x/WebMinOpenApi/WebMinOpenApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<PropertyGroup>
1212
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
13-
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
13+
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
1414
</PropertyGroup>
1515

1616
<ItemGroup>

aspnetcore/fundamentals/openapi/samples/10.x/WebMinOpenApi/projectFile.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<PropertyGroup>
10-
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
10+
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
1111
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
1212
</PropertyGroup>
1313

aspnetcore/fundamentals/openapi/samples/9.x/WebMinOpenApi/WebMinOpenApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<PropertyGroup>
1212
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
13-
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
13+
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
1414
</PropertyGroup>
1515

1616
<ItemGroup>

aspnetcore/fundamentals/openapi/samples/9.x/WebMinOpenApi/projectFile.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<PropertyGroup>
10-
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
10+
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
1111
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
1212
</PropertyGroup>
1313

aspnetcore/fundamentals/openapi/using-openapi-documents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: wadepickett
55
description: Learn how to use OpenAPI documents in an ASP.NET Core app.
66
monikerRange: '>= aspnetcore-6.0'
77
ms.author: wpickett
8-
ms.date: 02/02/2026
8+
ms.date: 08/28/2026
99
uid: fundamentals/openapi/using-openapi-documents
1010
---
1111
# Use openAPI documents
@@ -66,7 +66,7 @@ Enable document generation at build time by setting the following properties in
6666
```xml
6767
<PropertyGroup>
6868
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
69-
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
69+
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
7070
</PropertyGroup>
7171
```
7272

aspnetcore/release-notes/aspnetcore-10/samples/WebAppOpenAPI10/WebAppOpenAPI10.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFramework>net10.0</TargetFramework>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
8-
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
8+
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
99
<!-- Configure build-time OpenAPI generation to produce an OpenAPI 3.1 document. -->
1010
<OpenApiGenerateDocumentsOptions>--openapi-version OpenApi3_1</OpenApiGenerateDocumentsOptions>
1111
</PropertyGroup>

0 commit comments

Comments
 (0)