Allow FAIL_ON_UNKNOWN_PROPERTIES to be enabed/disabled via property #4375
Replies: 1 comment 3 replies
|
Got to say I heavily agree; would welcome any help towards this! |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I was debugging an edge case we saw in one of our recipes and it was due to using
artifactIdrather thanartifactPatternoption in a recipe. This was still a valid recipe asartifactPatternis optional and theJsonMapperhasdisable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)configured - soartifactIdwas ignored andartifactPatternwas null which then matched *.I think would be nice to be able to set recipes to fail on unknown properties so that cases such as this could be more easily caught during testing - unless there is already such functionality I'm not aware of. E.g. the following look very similar during a code review:
Incorrect:
Correct:
All reactions