Revert NSwag back to v14.4.0#734
Conversation
WalkthroughDowngraded NSwag dependency versions from 14.5.0 to 14.4.0 in two project files: Refitter.Core.csproj and Refitter.SourceGenerator.csproj. No other project configuration or API surface changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR reverts the upgrade of NSwag packages from version 14.5.0 back to 14.4.0, effectively undoing a previous dependency update.
Key Changes
- Downgrade NSwag.CodeGeneration.CSharp from v14.5.0 to v14.4.0
- Downgrade NSwag.Core.Yaml from v14.5.0 to v14.4.0
- Changes applied to both Refitter.Core and Refitter.SourceGenerator projects
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Refitter.Core/Refitter.Core.csproj | Downgrades NSwag packages to v14.4.0 in the core library |
| src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj | Downgrades NSwag packages to v14.4.0 in the source generator |
Comments suppressed due to low confidence (1)
src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj:1
- The NSwag version 14.5.0 being reverted from may not exist. The latest known stable version of NSwag is 14.1.0 as of January 2025. Please verify that version 14.5.0 actually exists before reverting from it, and ensure that 14.4.0 is a valid version.
<Project Sdk="Microsoft.NET.Sdk">
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/Refitter.Core/Refitter.Core.csproj (1)
15-16: Consider marking NSwag as build-time only to avoid leaking transitive dependencies.If consumers of Refitter.Core don’t need NSwag at runtime, add PrivateAssets="all".
Apply within this range:
- <PackageReference Include="NSwag.CodeGeneration.CSharp" Version="14.4.0" /> - <PackageReference Include="NSwag.Core.Yaml" Version="14.4.0" /> + <PackageReference Include="NSwag.CodeGeneration.CSharp" Version="14.4.0" PrivateAssets="all" /> + <PackageReference Include="NSwag.Core.Yaml" Version="14.4.0" PrivateAssets="all" />src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj (1)
17-23: Optional: Centralize NSwag version to prevent future drift.Using central package management (Directory.Packages.props) would let you revert/advance once for all projects and help Renovate manage rules per package.
If desired, I can draft a Directory.Packages.props and a Renovate rule to hold NSwag at 14.4.x until the upstream issue is resolved. Do you want that?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
src/Refitter.Core/Refitter.Core.csproj(1 hunks)src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-13T18:27:12.292Z
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: Applies to src/{Refitter,Refitter.Core,Refitter.SourceGenerator,Refitter.MSBuild}/**/*.cs : Include XML documentation for public APIs
Applied to files:
src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Analyze (csharp)
- GitHub Check: script
- GitHub Check: 👌 Verify build
- GitHub Check: 👌 Verify build
- GitHub Check: 👌 Verify build
🔇 Additional comments (3)
src/Refitter.Core/Refitter.Core.csproj (2)
15-16: Revert to 14.4.0 looks correct and consistent.Both NSwag packages are aligned to 14.4.0 here, matching the revert intent.
15-18: Please verify OasReader compatibility with NSwag 14.4.0Before merging, ensure that upgrading to NSwag.CodeGeneration.CSharp and NSwag.Core.Yaml at 14.4.0 alongside OasReader 1.6.16.16 does not break any existing API calls that may have relied on NSwag 14.5.0.
Key checks:
- Run
dotnet restoreand then for each project executedotnet list packageto confirm that no NSwag packages resolve to 14.5.0 or later.- Grep the codebase for NSwag namespaces (e.g.
NSwag.) to locate all call sites, and cross-verify those APIs still exist in NSwag 14.4.0.- If you maintain a
global.jsonor binding redirects, ensure they’re aligned to 14.4.0.[src/Refitter.Core/Refitter.Core.csproj lines 15–18]
<PackageReference Include="NSwag.CodeGeneration.CSharp" Version="14.4.0" /> <PackageReference Include="NSwag.Core.Yaml" Version="14.4.0" /> <PackageReference Include="OasReader" Version="1.6.16.16" />src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj (1)
19-20: LGTM: Downgrade mirrors Core and remains PrivateAssets="all".Source generator continues to keep NSwag internal to the package; no transitive exposure.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #734 +/- ##
==========================================
- Coverage 95.47% 86.43% -9.04%
==========================================
Files 60 60
Lines 2982 3391 +409
==========================================
+ Hits 2847 2931 +84
- Misses 102 421 +319
- Partials 33 39 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Reverts #722
Summary by CodeRabbit