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

[Maintenance] Remove AJV Validation #4349

Closed
2 tasks
tbolt opened this issue Oct 11, 2022 · 1 comment · Fixed by #4389
Closed
2 tasks

[Maintenance] Remove AJV Validation #4349

tbolt opened this issue Oct 11, 2022 · 1 comment · Fixed by #4389
Assignees
Labels
Development Issues for the dev team resolve small

Comments

@tbolt
Copy link
Contributor

tbolt commented Oct 11, 2022

MongoDB provides some level of built-in validation checking. With that along with Joi for admin check validation we likely no longer have a need for AJV validation. The validations it provides can be replaced by mongos built-in validations. We should devise a plan on how best to remove it and how to move its validations to Mongo's built-ins

This task is done when...

  • Determine best path forward for validation architecture
  • Remove/update validations based on new validation architecture
@tbolt tbolt added the Development Issues for the dev team resolve label Oct 11, 2022
@tbolt
Copy link
Contributor Author

tbolt commented Oct 13, 2022

In addition to the above we should consider moving our validations to Mongo's pre function-
https://mongoosejs.com/docs/middleware.html#pre

Both the mongo validation and the adminCheck validations could be run within the pre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development Issues for the dev team resolve small
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants