[#3837] Add warning/error for redundant ignoreUnmappedSourceProperties entries#3906
[#3837] Add warning/error for redundant ignoreUnmappedSourceProperties entries#3906filiphr merged 4 commits intomapstruct:mainfrom codeswithritesh:main
Conversation
…roperties are actually mapped. Respects unmappedSourcePolicy and includes tests for redundant and valid ignore cases.
…ceProperties warning's UserMappers
|
Looks good, though the message grammar is a little off. I would rephrase it as |
…ion message. Updated the validation message to use clearer and more grammatically correct phrasing, e.g., "Source property 'email' is mapped despite being listed in ignoreUnmappedSourceProperties."
|
Thanks for the suggestion, gnuemacscoin! I have updated the validation messages as recommended. Below are example warning/error messages generated by MapStruct using the format: • For a single source property: • For multiple source properties: Let me know if you'd prefer a different phrasing. @filiphr When you have a moment, could you please take a look at this PR? Your feedback would be appreciated. |
filiphr
left a comment
There was a problem hiding this comment.
The approach looks OK @codeswithritesh. I've left one comment that should be addressed before merging this, we should not need changes in the fullFeaturesTest/pom.xml. We should instead use Erroneous in the name of the mappers, that are producing compile errors, in our tests
|
Thank you, @filiphr! |
|
Thanks @codeswithritesh, I've merged this |
|
Thank you @filiphr |
Enhancement: warn when mapped properties are listed in ignoreUnmappedSourceProperties (#3837)
Fixes Report properties in
ignoreUnmappedSourcePropertiesthat actually do get mapped #3837