-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(framework): add class-validator support #6945
base: next
Are you sure you want to change the base?
feat(framework): add class-validator support #6945
Conversation
Co-authored-by: Richard Fontein <[email protected]>
Co-authored-by: Richard Fontein <[email protected]>
…validator-support' into feat-package-class-validator-support
….com/paulwer/novu into feat-package-class-validator-support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @paulwer , thank you for your contribution!
any updates? |
@paulwer can you please fix the rebase conflicts to continue with the final review? |
…ge-class-validator-support
@SokratisVidros @rifont i have pulled the next branch into this PR and fixed the conflicts. |
@SokratisVidros @rifont I've reworked the documentation section to fit to this PR. |
What changed? Why was the change needed?
Stringify<T>
generic helper for helpful type error messagescheckIsErrorResponse
into@novu/framework
to resolve ESM import issues from@novu/shared
Screenhots
Class validator peer dependency import failure message
New type error messages shown when attempting to consume data for invalid schemas
![image](https://private-user-images.githubusercontent.com/32132657/391753693-df58e58d-59ff-4ed5-a07c-68064211d809.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MzYyNTQsIm5iZiI6MTczOTczNTk1NCwicGF0aCI6Ii8zMjEzMjY1Ny8zOTE3NTM2OTMtZGY1OGU1OGQtNTlmZi00ZWQ1LWEwN2MtNjgwNjQyMTFkODA5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDE5NTkxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVjMzkxNmFmODZiNjE1OWIwZDA0ZjUxMjRlNTM0NmE2OWM3NTliZWVjODNiMTVkYWNmNTJjM2NhMWRhYzAzNWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Fp5f1XUQkrRlHADjuxsoQyQloHJG-1cZ82gLOgNu6tE)
Demonstrating a more advanced variant of the error message
![image](https://private-user-images.githubusercontent.com/32132657/391759829-45e27682-7467-458f-a16c-7986a1726a60.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MzYyNTQsIm5iZiI6MTczOTczNTk1NCwicGF0aCI6Ii8zMjEzMjY1Ny8zOTE3NTk4MjktNDVlMjc2ODItNzQ2Ny00NThmLWExNmMtNzk4NmExNzI2YTYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDE5NTkxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI0OTE3YWVmZWMxZDJkYzM4M2VkYzcwMmE2ZDNhMmQyMzc2YTMzMjgxZjYzM2FiZWFiNGVlNmE1ZmEyMTRjZDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.f-GxvOyy9rgSUTJDqPwDd0eDyxAsBbYoOFMhbH3iMFg)
Expand for optional sections
### Related enterprise PRSpecial notes for your reviewer
closes #6682
reference #6840