novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
35.52k stars 3.92k forks source link

šŸš€ Feature: @novu/framework Integration with class-validator #6682

Open paulwer opened 1 month ago

paulwer commented 1 month ago

šŸ”– Feature description

Hi there, we are using novu with a nestjs service, and have multiple classes already defined with class-validator for validation and dont use zod right now. Would it be possible to add support for class-validator for schema definition instead of zod?

šŸŽ¤ Why is this feature needed ?

NestJs and multiple other services are using this lib already for validation and it would help quite alot to just reuse existing classes within the workflow definitions.

āœŒļø How do you aim to achieve this?

We dont know for certain if there are any technical limitations, but if not it would be great if both libraries could be used as input.

šŸ”„ļø Additional Information

class-validator to json schema: https://www.npmjs.com/package/class-validator-jsonschema

šŸ‘€ Have you spent some time to check if this feature request has been raised before?

šŸ¢ Have you read the Code of Conduct?

Are you willing to submit PR?

None

linear[bot] commented 1 month ago

NV-4485 šŸš€ Feature: NestJs Integration with class-validator

paulwer commented 1 month ago

I am currently in the work to provide a PR for this.