Update test assertions for struct nullability and target framework#1142
Conversation
📝 WalkthroughWalkthroughTwo test-only fixes: the expected generated property in the Swagger 2 optional-reference-property nullability regression test is updated from ChangesTest Maintenance
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1142 +/- ##
==========================================
- Coverage 94.57% 94.31% -0.26%
==========================================
Files 38 48 +10
Lines 2597 2796 +199
==========================================
+ Hits 2456 2637 +181
- Misses 44 53 +9
- Partials 97 106 +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
Struct nullability test (
NormalizeSwagger2OptionalReferencePropertyNullability_Incorrectly_Removes_Nullability_From_Struct_Value_Types): Updated assertion forDateTimeto match actual buggy behavior.DateTimeis parsed asIdentifierNameSyntax(notPredefinedTypeSyntax), so the normalizer also strips?from it — same bug as custom structs.Polymorphism runtime proof (
GenerateJsonSerializerContextPolymorphismTests): Changed target framework fromnet8.0tonet10.0to match the available .NET runtime.Verification
Summary by CodeRabbit