typestack / class-transformer

Decorator-based transformation, serialization, and deserialization between objects and classes.
MIT License
6.77k stars 495 forks source link

question: How may I ignore all @expose decorator but keep anothers decorators #1456

Open AndresGX opened 1 year ago

AndresGX commented 1 year ago

The problem: I need to use my class with decorator @expose but in another endpoints I need to only ignore this decorator for all class, transformOptions only has ignoreDecorators but I need ignore @expose decorator

mrbrunelli commented 1 year ago

The problem: I need to use my class with decorator @expose but in another endpoints I need to only ignore this decorator for all class, transformOptions only has ignoreDecorators but I need ignore @expose decorator

Did you try to use the groups? You can ignore a field when it's in a particular group.