From 2adf3aa4d4c2d72c43dc0c77a3231b2771f82146 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 03:05:46 +0000 Subject: [PATCH 1/4] Initial plan From 070ecd11588f07f73931cfbaaa36f3f2fca28ee1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 03:07:47 +0000 Subject: [PATCH 2/4] Freshness update: web-api-help-pages-using-swagger.md Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> --- .../tutorials/web-api-help-pages-using-swagger.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/aspnetcore/tutorials/web-api-help-pages-using-swagger.md b/aspnetcore/tutorials/web-api-help-pages-using-swagger.md index 00ec6fc2d2d3..2e53b8028d33 100644 --- a/aspnetcore/tutorials/web-api-help-pages-using-swagger.md +++ b/aspnetcore/tutorials/web-api-help-pages-using-swagger.md @@ -1,11 +1,12 @@ --- title: ASP.NET Core web API documentation with Swagger / OpenAPI +ai-usage: ai-assisted author: RicoSuter description: This tutorial provides a walkthrough of adding Swagger to generate documentation and help pages for a web API app. ms.author: wpickett ms.custom: mvc monikerRange: ">= aspnetcore-3.1 <= aspnetcore-8.0" -ms.date: 4/25/2024 +ms.date: 02/23/2026 uid: tutorials/web-api-help-pages-using-swagger --- # ASP.NET Core web API documentation with Swagger / OpenAPI @@ -14,6 +15,9 @@ uid: tutorials/web-api-help-pages-using-swagger By [Rico Suter](https://blog.rsuter.com/) +> [!NOTE] +> In .NET 9 and later, ASP.NET Core includes built-in OpenAPI support. Swashbuckle is no longer included by default, but it remains available as a community package you can add manually to ASP.NET Core projects targeting .NET 9 or later. To understand the built-in OpenAPI features, see . For the complete built-in ASP.NET Core OpenAPI documentation, see . + [Swagger](https://swagger.io/) ([OpenAPI](https://www.openapis.org/)) is a language-agnostic specification for describing REST APIs. It allows both computers and humans to understand the capabilities of a REST API without direct access to the source code. Its main goals are to: * Minimize the amount of work needed to connect decoupled services. @@ -147,12 +151,14 @@ In the preceding code, the `/weatherforecast` endpoint doesn't need authorizatio The following Curl passes a JWT token to test the Swagger UI endpoint: ```bash -curl -i -H "Authorization: Bearer {token}" https://localhost:{port}/swagger/v1/swagger.json +curl -i -H "Authorization: Bearer {TOKEN}" https://localhost:{PORT}/swagger/v1/swagger.json ``` +where the `{TOKEN}` placeholder is the JWT bearer token and the `{PORT}` placeholder is the port number. + For more information on testing with JWT tokens, see . -## Generate an XML documentation file at compile time. +## Generate an XML documentation file at compile time See [GenerateDocumentationFile](/dotnet/core/project-sdk/msbuild-props#generatedocumentationfile) for more information. From cd33b32926ba7e44479dd9292fe03fc5f948ad9e Mon Sep 17 00:00:00 2001 From: Wade Pickett Date: Sun, 22 Feb 2026 19:36:38 -0800 Subject: [PATCH 3/4] Revise Swagger documentation for .NET 9 changes Updated the article to reflect changes in .NET 9 regarding OpenAPI support and the status of Swashbuckle. --- aspnetcore/tutorials/web-api-help-pages-using-swagger.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/aspnetcore/tutorials/web-api-help-pages-using-swagger.md b/aspnetcore/tutorials/web-api-help-pages-using-swagger.md index 2e53b8028d33..74124139595c 100644 --- a/aspnetcore/tutorials/web-api-help-pages-using-swagger.md +++ b/aspnetcore/tutorials/web-api-help-pages-using-swagger.md @@ -16,7 +16,14 @@ uid: tutorials/web-api-help-pages-using-swagger By [Rico Suter](https://blog.rsuter.com/) > [!NOTE] -> In .NET 9 and later, ASP.NET Core includes built-in OpenAPI support. Swashbuckle is no longer included by default, but it remains available as a community package you can add manually to ASP.NET Core projects targeting .NET 9 or later. To understand the built-in OpenAPI features, see . For the complete built-in ASP.NET Core OpenAPI documentation, see . +> This article covers using **Swagger** tooling — provided by the [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) and [NSwag](https://github.com/RicoSuter/NSwag) packages — to generate OpenAPI documentation and interactive help pages for ASP.NET Core web APIs. +> +> In .NET 9 and later, ASP.NET Core includes built-in OpenAPI support that replaces Swashbuckle as the default. Swashbuckle is no longer included in project templates, but it remains available as a community package you can add manually. +> +> * To understand the built‑in OpenAPI features, see . +> * To add Swagger UI for interactive exploration or local ad‑hoc testing alongside the built-in OpenAPI support, see . +> +> The following instructions apply to projects using Swashbuckle or NSwag with ASP.NET Core 8.0 and earlier. [Swagger](https://swagger.io/) ([OpenAPI](https://www.openapis.org/)) is a language-agnostic specification for describing REST APIs. It allows both computers and humans to understand the capabilities of a REST API without direct access to the source code. Its main goals are to: From 80829a94348d54c35e8a62fbd328662feb575c57 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 21:59:22 +0000 Subject: [PATCH 4/4] Convert NOTE callout to introduction paragraphs Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> --- .../web-api-help-pages-using-swagger.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/aspnetcore/tutorials/web-api-help-pages-using-swagger.md b/aspnetcore/tutorials/web-api-help-pages-using-swagger.md index 74124139595c..5227f5dfd634 100644 --- a/aspnetcore/tutorials/web-api-help-pages-using-swagger.md +++ b/aspnetcore/tutorials/web-api-help-pages-using-swagger.md @@ -15,15 +15,14 @@ uid: tutorials/web-api-help-pages-using-swagger By [Rico Suter](https://blog.rsuter.com/) -> [!NOTE] -> This article covers using **Swagger** tooling — provided by the [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) and [NSwag](https://github.com/RicoSuter/NSwag) packages — to generate OpenAPI documentation and interactive help pages for ASP.NET Core web APIs. -> -> In .NET 9 and later, ASP.NET Core includes built-in OpenAPI support that replaces Swashbuckle as the default. Swashbuckle is no longer included in project templates, but it remains available as a community package you can add manually. -> -> * To understand the built‑in OpenAPI features, see . -> * To add Swagger UI for interactive exploration or local ad‑hoc testing alongside the built-in OpenAPI support, see . -> -> The following instructions apply to projects using Swashbuckle or NSwag with ASP.NET Core 8.0 and earlier. +This article covers using **Swagger** tooling — provided by the [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) and [NSwag](https://github.com/RicoSuter/NSwag) packages — to generate OpenAPI documentation and interactive help pages for ASP.NET Core web APIs. + +In .NET 9 and later, ASP.NET Core includes built-in OpenAPI support that replaces Swashbuckle as the default. Swashbuckle is no longer included in project templates, but it remains available as a community package you can add manually. + +* To understand the built‑in OpenAPI features, see . +* To add Swagger UI for interactive exploration or local ad‑hoc testing alongside the built-in OpenAPI support, see . + +The following instructions apply to projects using Swashbuckle or NSwag with ASP.NET Core 8.0 and earlier. [Swagger](https://swagger.io/) ([OpenAPI](https://www.openapis.org/)) is a language-agnostic specification for describing REST APIs. It allows both computers and humans to understand the capabilities of a REST API without direct access to the source code. Its main goals are to: