Hi,
no, it is not possible atm., but it's an interesting proposal.
I believe it generally should be a conscious decision how a given source enum value should be mapped. So I kind of like the fact that the generator raises an error in case a new source enum member is added which is not mapped and thus forces you to think about the mapping.
But I can see that a default mapping might make sense in certain cases (e.g. if there is some sort of "UNKNOWN" member in the target enum). So I wouldn't object to add support for this, provided the user has to "opt in" to enable such default mapping, keeping today's behavior the default.
The first approach coming to mind would be a special value for the source() attribute representing "any" source enum member. It would have to be a value which is no legal Java enum member name. WDYT e.g. about this:
@Mapping(source = "#ANY", target = "FOO"),
BarEnum mapEnum(FooEnum enum);
Thinking about it, we'd likely need two reserved values, "#ANY" for mapping any source member not explicitly configured and something like "#ANY_UNMAPPED" for mapping those source members which are not configured explicitly nor have a corresponding target member of the same name.
Thanks,
--Gunnar