Today's issue:
Today's package does not enable users to validate the config object resulting from loading env variables.
Suggestion solution:
A suggested solution would be to run validation against the config object. It would have an impact as the user would need to call the method load with an option object containing schema validation for Joi.
Internally, the load method could call that validation and throw an exception if any error occurs.
Opened questions:
Which validator should we handle : Joi and class-validator or both. In my opinion, given the overhead of doing both, it would worth doing both.
Today's issue:
Today's package does not enable users to validate the config object resulting from loading env variables.
Suggestion solution:
A suggested solution would be to run validation against the config object. It would have an impact as the user would need to call the method
loadwith an option object containing schema validation for Joi.Internally, the load method could call that validation and throw an exception if any error occurs.
Opened questions:
Which validator should we handle : Joi and class-validator or both. In my opinion, given the overhead of doing both, it would worth doing both.