Freshness update: web-api-help-pages-using-swagger.md#36787
Conversation
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Updated the article to reflect changes in .NET 9 regarding OpenAPI support and the status of Swashbuckle.
wadepickett
left a comment
There was a problem hiding this comment.
Approved after I committed a few fixes to the AI gen original PR.
|
@copilot, move this into an introduction paragraph rather than a note as it is now, it is currently on line 18 of aspnetcore/tutorials/web-api-help-pages-using-swagger.md: Note This article covers using Swagger tooling — provided by the Swashbuckle.AspNetCore and 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. |
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
wadepickett
left a comment
There was a problem hiding this comment.
Approved after a number of commits to improve which have now been merged.
ai-usage: ai-assistedto frontmatterms.dateformat/value to02/23/2026{TOKEN},{PORT}, with explanatory textOriginal 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.mdFile:
aspnetcore/tutorials/web-api-help-pages-using-swagger.mdRepository:
dotnet/AspNetCore.DocsReviewed: 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
MM/DD/YYYYper the repo guidelines (should be04/25/2024).4. Bash placeholder casing doesn't follow repo conventions
Location: Line 150
curl -i -H "Authorization: Bearer {token}" https://localhost:{port}/swagger/v1/swagger.jsonPer 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.jsonWith 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.mdarticle 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)
xref:syntax (e.g.,xref:tutorials/get-started-with-swashbuckle)GenerateDocumentationFileuses the correct relative format without localeRequireAuthorizationuses proper encoding:::code) is correctly formatted*as required by the repotitlefirst, with remaining fields in alphabetical orderProposed NOTE for .NET 9+ Users
The NOTE
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