Propagate JsonLibraryVersion and preserve ImmutableRecords for GenerateNativeRecords#1141
Conversation
…e and explicit property copy
…ymorphic serialization
…enerateNativeRecords
|
Warning Review limit reached
More reviews will be available in 23 minutes. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1141 +/- ##
==========================================
- Coverage 94.73% 94.67% -0.06%
==========================================
Files 39 47 +8
Lines 2658 2910 +252
==========================================
+ Hits 2518 2755 +237
- Misses 46 52 +6
- Partials 94 103 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Fixes
Two bugs in CSharpClientGeneratorFactory.cs:
GenerateNativeRecords overwritten by ApplyCodeGeneratorSettings — When
ImmutableRecordswas true, the initializer correctly setGenerateNativeRecords = true, butApplyCodeGeneratorSettingsthen overwrote it with the default \alse\ fromCodeGeneratorSettings.GenerateNativeRecords. Fixed by reapplying the combined logic afterApplyCodeGeneratorSettings.JsonLibraryVersionnever propagated to NSwag — TheApplyCodeGeneratorSettingsmethod was missingdestination.JsonLibraryVersion = source.JsonLibraryVersion;, so settingJsonLibraryVersion = 9.0had no effect.