-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
internalChanges only affect the internal APIChanges only affect the internal API
Description
Context
class-transformer is used to create objects from JSON configs and handling default values properly.
Problem
- It requires
reflect-metadataand decorators for proper usage which both add complexity to the project that often caused extra work and deep analysis of the build chain and the configuration of each tool in the chain. - It contains a bug (fix: exposeDefaultValues does not work typestack/class-transformer#1609, also see question: How to serialize a class instance with default values automatically removed? typestack/class-transformer#1505) that has been unresolved for a long time now.
- The last release was in November 2021 which is 3 1/2 years ago (as of May 2025).
Proposed Solution
- Use Zod as a way to define the schema, validate data and do the defaults handling which works without experimental/less supported processing like
reflect-metadataand decorators.
Metadata
Metadata
Assignees
Labels
internalChanges only affect the internal APIChanges only affect the internal API