class-transformer
class-transformer copied to clipboard
feature: Support 'and' operator between groups
Description
When we use groups
option decorators are applied when at least one group is passed to the planToInstance
. Could you please make it possible to change that logic and apply decorators when all members of the group are presented? (Or provide some generic solution for that condition)
Proposed solution
When we use:
plainToInstance(Class, plainObject, { groups: ['a'] });
Now:
@Expose({groups: ['a','b','c']})
will be applied when 'a' or 'b' or 'c' is given
Expected:
@Expose({groups: ['a','b','c'], strictGroupsBehaviour: true })
will applied when 'a' and 'b' and 'c' is given
Probably duplicated https://github.com/typestack/class-transformer/issues/203