eAPD icon indicating copy to clipboard operation
eAPD copied to clipboard

[Maintenance] Remove AJV Validation

Open tbolt opened this issue 2 years ago • 1 comments

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 avatar Oct 11 '22 15:10 tbolt

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

tbolt avatar Oct 13 '22 14:10 tbolt