-
Notifications
You must be signed in to change notification settings - Fork 924
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
Create correct FieldInfo
for renamed object fields in DocService
#4507
Conversation
FieldInfo
for renamed fields in DocService
FieldInfo
for renamed object fields in DocService
Codecov ReportBase: 74.05% // Head: 74.06% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #4507 +/- ##
============================================
+ Coverage 74.05% 74.06% +0.01%
- Complexity 18167 18183 +16
============================================
Files 1536 1537 +1
Lines 67378 67434 +56
Branches 8520 8533 +13
============================================
+ Hits 49894 49946 +52
- Misses 13412 13418 +6
+ Partials 4072 4070 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, @ks-yim! 💯👍
val defaultValue2: String = "Hello2", | ||
@JsonProperty("renamed") | ||
@Description("renamed description") | ||
val name: String? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add a test for a non-null value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. I will add a test for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changeset looks good to me 👍 Thanks @ks-yim ! 🙇 👍 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good as always. 😄
Motivation: When the target release version changed from 1.21.0 to 1.20.3, some PRs were already merged into the master branch. So their milestone should be changed and the release notes also need to be updated. Modifications: - Add #4515, #4507, #4484 and #4492 to the release notes. Result: Update the missing issues and PRs.
Motivation:
FieldInfo
is not correctly rendered inDocService
if bean field names are overridden by@JsonProperty
#4506Modifications:
BeanPropertyDefinition#getInternalName
to find the right constructor parameter or getter.BeanPropertyDefinition#getName
#getInternalName
is derived from accessor and is not based on annotations or naming strategy.* Use
@JsonProperty
annotation-based matching strategy to find the right field or constructor parameter for the fields without accessor(getter).#getInternalName
is generated based on annotations or naming strategy if there's no available accessor for a field.Limitation:
@JsonProperty
annotation-based field matching strategy may not cover POJOs without@JsonProperty
and de/serialized with non-default naming strategy .Result:
FieldInfo
is not correctly rendered inDocService
if bean field names are overridden by@JsonProperty
#4506