Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look at alternatives for class-transformer and class-validator #749

Closed
TimoGlastra opened this issue May 7, 2022 · 1 comment
Closed

Comments

@TimoGlastra
Copy link
Contributor

Although class-transformer and class-validator do a lot of heavy lifting in terms of (de)seralization and validation the libraries are largely unmaintained and have issues when dealing with complexer types. This issue is to create a list of alternative to these libraries so we can make a decicision whether it is worth it to change the library to something else.

Cons:

  • Libraries are mostly unmaintained
  • We need an if (options) in the constructor of each class
  • A lot of times there's no need for a class instance, an interface that could be validated would be sufficient
  • ValidateNested doesn't work nicely, especially if you have arrays of mixed types with primitive types
  • The created schemas don't always reflect the correct type which results in a half-typed rest api

Options: (https://www.typescriptneedstypes.com/)

@TimoGlastra
Copy link
Contributor Author

Superseded by #1489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant