Skip to content

Report ignored source properties which are missing #2481

Description

@incaseoftrouble

For unmappedSourcePolicy = ReportingPolicy.WARN or above, one can use @BeanMapping(ignoreUnmappedSourceProperties = {...}) to declare source properties which are omitted intentionally. However, an equally simple dual option is missing. I'd suggest having a ignoredSourcePolicy configuration which warns / fails if an unknown source property is missing. This is useful for keeping this list "in sync" with reality, especially helpful after refractoring.

I am aware that one could achieve through ignoreByDefault = true, but then you'd have to write all mappings explicitly.

Sure, compared to a required missing target property, an ignored missing source property is not really dramatic, but it helps with debugging and keeping code clean. Its definitely a low-priority suggestion.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions