Skip to content

Comments

Freshness update: web-api-help-pages-using-swagger.md#36787

Open
Copilot wants to merge 3 commits intomainfrom
copilot/update-swagger-help-page
Open

Freshness update: web-api-help-pages-using-swagger.md#36787
Copilot wants to merge 3 commits intomainfrom
copilot/update-swagger-help-page

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

The Swagger/OpenAPI overview article was stale: no guidance for .NET 9+ readers, stale ms.date, lowercase placeholders in the curl example, and a trailing period in a section heading.

Changes

  • Added .NET 9+ NOTE at the top of the >= aspnetcore-8.0 moniker block, pointing readers to xref:fundamentals/openapi/overview and xref:fundamentals/openapi/aspnetcore-openapi for built-in OpenAPI support
  • Fixed ms.date: 4/25/202402/23/2026 (MM/DD/YYYY format per repo convention)
  • Added ai-usage: ai-assisted to frontmatter
  • Uppercased curl placeholders: {token}{TOKEN}, {port}{PORT}; added inline explanation of each placeholder per repo convention
  • Removed trailing period from ## Generate an XML documentation file at compile time.
Original prompt

This section details on the original issue you should resolve

<issue_title>Freshness Update: web-api-help-pages-sing-swagger</issue_title>
<issue_description>### Description

Contributes to #36100

AI generated freshness report:

Run by: WadePickett

Review Report: web-api-help-pages-using-swagger.md

File: aspnetcore/tutorials/web-api-help-pages-using-swagger.md
Repository: dotnet/AspNetCore.Docs
Reviewed: 2026-02-23
Reviewer: @wadepickett


Overview

This article covers ASP.NET Core web API documentation with Swagger/OpenAPI. After a thorough review against the repository's copilot instructions and the current state of ASP.NET Core OpenAPI support, this article needs updating.


Verdict: Needs Updating


Critical Issues


It is by design that the article's `monikerRange` is capped at `aspnetcore-8.0 since starting with .NET 9, ASP.NET Core Swashbuckle was replaced as the default OpenAPI approach with the built-in `Microsoft.AspNetCore.OpenApi` package. The repository already has dedicated OpenAPI documentation for .NET 9+ at:

* `aspnetcore/fundamentals/openapi/overview.md` (uid: `fundamentals/openapi/overview`)
* `aspnetcore/fundamentals/openapi/aspnetcore-openapi.md` (uid: `fundamentals/openapi/aspnetcore-openapi`)

**Assessment:** The capped moniker range is intentional and correct for this article's Swashbuckle/NSwag content. However, the 8.0 article should explicitly guide readers developing with .NET 9+ to the newer OpenAPI documentation rather than leaving them with no visible content

###  No guidance directing .NET 9+ users to the new OpenAPI docs

### Stale `ms.date` format and value

**Location:** Frontmatter, line 8

```yaml
ms.date: 4/25/2024
  • The format should be MM/DD/YYYY per the repo guidelines (should be 04/25/2024).
  • The date itself is nearly two years old and should be updated to today's date if any content changes are made.

4. Bash placeholder casing doesn't follow repo conventions

Location: Line 150

curl -i -H "Authorization: Bearer {token}" https://localhost:{port}/swagger/v1/swagger.json

Per the copilot instructions, placeholders should use uppercase with spaces between words: {TOKEN} and {PORT}. The current {token} and {port} don't conform. Additionally, placeholder descriptions should be provided in the surrounding text.

Should be:

curl -i -H "Authorization: Bearer {TOKEN}" https://localhost:{PORT}/swagger/v1/swagger.json

With surrounding text explaining: "where the {TOKEN} placeholder is the JWT bearer token and the {PORT} placeholder is the port number."


Moderate Issues

5. Missing "not latest version" banner, however it is not needed in this case.

The fundamentals/openapi/overview.md article includes [!INCLUDE[](~/includes/not-latest-version.md)] for versioned content, but this Swagger article does not. There is good reason for this. Since the article only applies to <= aspnetcore-8.0, adding this include would help readers understand they're viewing older content.

6. Trailing period in section header

Location: Line 155

## Generate an XML documentation file at compile time.

Per the Microsoft Writing Style Guide and repo conventions, section headers should not end with a period.

Should be:

## Generate an XML documentation file at compile time

--

What's Good (No Changes Needed)

  • ✅ Cross-references use proper xref: syntax (e.g., xref:tutorials/get-started-with-swashbuckle)
  • ✅ External links (GitHub repos, swagger.io) use full URLs
  • ✅ The Microsoft Learn link for GenerateDocumentationFile uses the correct relative format without locale
  • ✅ The API xref for RequireAuthorization uses proper encoding
  • ✅ Code snippet reference syntax (:::code) is correctly formatted
  • ✅ Bullet markers use * as required by the repo
  • ✅ OpenAPI specification JSON example is helpful and well-formatted
  • ✅ Metadata has title first, with remaining fields in alphabetical order

Proposed NOTE for .NET 9+ Users

The NOTE

> [!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 <xref:fundamentals/openapi/overview?view=aspnetcore-9.0&preserve-view=true>.  
> • To add and use the Swagger UI provided by the `Swashbuckle.AspNetCore.SwaggerUI` package for interactive exploration or local ad‑hoc testing, see <xref:fundamentals/openapi/using-openapi-documents#use-swagger-ui-for-local-ad-hoc-testing>.
>
>The following instructions apply when using Swashbuckle with .NET versions earlier than 9.

Analysis: Does this NOTE belong in the article?

Yes. This NOTE is highly valuable and...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Internal previews

📄 File 🔗 Preview link
aspnetcore/tutorials/web-api-help-pages-using-swagger.md ASP.NET Core web API documentation with Swagger / OpenAPI

Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Copilot AI changed the title [WIP] Update web API help pages with Swagger documentation Freshness update: web-api-help-pages-using-swagger.md Feb 23, 2026
Copilot AI requested a review from wadepickett February 23, 2026 03:08
@wadepickett wadepickett marked this pull request as ready for review February 23, 2026 03:16
Updated the article to reflect changes in .NET 9 regarding OpenAPI support and the status of Swashbuckle.
Copy link
Contributor

@wadepickett wadepickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after I committed a few fixes to the AI gen original PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Freshness Update: web-api-help-pages-sing-swagger

2 participants