Upgrade Swashbuckle.AspNetCore to v10.1.5 with Microsoft.OpenApi v2.x namespace fix#8
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Upgrade Swashbuckle.AspNetCore to v10 with Microsoft.OpenApi v2.x compatibility
Upgrade Swashbuckle.AspNetCore to v10.1.5 with Microsoft.OpenApi v2.x namespace fix
Mar 20, 2026
markhazleton
marked this pull request as ready for review
March 20, 2026 12:26
markhazleton
added a commit
that referenced
this pull request
Mar 30, 2026
…o-v10 Upgrade Swashbuckle.AspNetCore to v10.1.5 with Microsoft.OpenApi v2.x namespace fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Swashbuckle.AspNetCore v10 requires Microsoft.OpenApi v2.x, which moved
OpenApiInfo(and related types) fromMicrosoft.OpenApi.Modelsto the rootMicrosoft.OpenApinamespace — causingCS0234build failures with the oldusingdirective.Changes
RESTRunner.Web.csproj: UpgradedSwashbuckle.AspNetCoreandSwashbuckle.AspNetCore.Newtonsoftfrom v9.0.4 → v10.1.5; resolvesMicrosoft.OpenApiv2.4.1 transitivelyProgram.cs: Updated namespace import to match OpenApi v2.x type locationAll existing
AddSwaggerGenconfiguration —TagActionsBy,DocInclusionPredicate,UseAllOfToExtendReferenceSchemas,UseSwaggerUI— is API-compatible with v10 and required no changes.Original prompt
This section details on the original issue you should resolve
<issue_title>Upgrade Swashbuckle.AspNetCore to v10 with Microsoft.OpenApi v2.x compatibility</issue_title>
<issue_description>## Overview
Upgrade Swashbuckle.AspNetCore from v9.0.4 to v10.1.0 to leverage latest Swagger/OpenAPI features, security updates, and improved .NET 10 integration. This upgrade requires code refactoring due to breaking changes in the Microsoft.OpenApi v2.x dependency.
Current Status
Breaking Changes
Microsoft.OpenApi v2.x Changes
Swashbuckle v10 requires Microsoft.OpenApi >= 2.3.0, which has several breaking changes:
OpenApiInfoand related types may have different initialization patternsKnown Issues from .NET 10 Upgrade Attempt
Error Encountered:
Affected File:
RESTRunner.Web\Program.csCurrent Code (Swashbuckle v9):
Research Phase (Before Implementation)
Tasks
Review Breaking Changes
Analyze Current Usage
Microsoft.OpenApiusages in codebaseCreate Migration Plan
Implementation Plan (After Research)
Phase 1: Update Packages (15 minutes)
Swashbuckle.AspNetCoreto v10.1.0Microsoft.OpenApito v2.3.0 (or latest)Phase 2: Code Refactoring (60-120 minutes)
Update using statements in
Program.csRefactor OpenApiInfo initialization
Update Swagger configuration
AddSwaggerGenconfigurationTagActionsByif API changedDocInclusionPredicateif API changedUpdate middleware configuration (if needed)
UseSwagger()andUseSwaggerUI()callsPhase 3: Testing & Validation (30-60 minutes)
Build Validation:
Swagger UI Validation:
dotnet runin RESTRunner.WebAPI Documentation Validation:
Manual Web App Testing:
Phase 4: Documentation (15 minutes)
Testing...
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.