Skip to content

#3908: Add similar suggestion for unknown property in @Ignored#3912

Merged
filiphr merged 2 commits into
mapstruct:mainfrom
znight1020:follow-up#3908
Aug 4, 2025
Merged

#3908: Add similar suggestion for unknown property in @Ignored#3912
filiphr merged 2 commits into
mapstruct:mainfrom
znight1020:follow-up#3908

Conversation

@znight1020

Copy link
Copy Markdown
Contributor

Summary

fix #3908 (follow up#3902) add mostSimilarProperty message
Ex) No property named "foo" exists in @ignored for target type "ErroneousIssue3902Mapper.ZooDto" Did you mean "name"?

The implementation refactors the handleDefinedMapping method to reuse the existing getMostSimilarWord logic for the @Ignored case.

Test cases have been updated and expanded to verify that the suggestions are working correctly, especially for typos.

@znight1020

Copy link
Copy Markdown
Contributor Author

Hi! @filiphr
I've created this follow-up PR to apply the suggestion you made in #3908.

adds the "Did you mean" suggestion to the error message for unknown properties in @Ignored. I'd appreciate it if you could take a look when you have a moment. Thank you!

@filiphr filiphr merged commit 2903654 into mapstruct:main Aug 4, 2025
4 checks passed
@filiphr

filiphr commented Aug 4, 2025

Copy link
Copy Markdown
Member

Thanks @znight1020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants