-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for JSON on optional nested types. #217
Fix for JSON on optional nested types. #217
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #217 +/- ##
==========================================
+ Coverage 97.61% 97.69% +0.07%
==========================================
Files 5 5
Lines 336 347 +11
Branches 71 76 +5
==========================================
+ Hits 328 339 +11
Misses 6 6
Partials 2 2 ☔ View full report in Codecov by Sentry. |
Thanks @kschwab for this PR 🙏 The test case that you've added is great. Could you please add another test case based on the code snippet in reported issue? |
@hramezani good catch. #196 was slightly different issue compared to mine. I have pushed a fix and added test. |
Thanks @kschwab for this. I've just updated the tests. |
Thanks @hramezani! |
Resolves #196
Updated to recursively search the annotation for any model that matches key. Note that there is a possibility that it could get the wrong field in case of union with complex types that both have the same key. Not sure how that case should be handled. For now, it picks first match.