Is your feature request related to a problem? Please describe.
When loading config files in initial-data-load, we assume, the config is in correct format. If there is a misconfiguration, it is found later in process and does not indicate the real problem in error logs.
Also it is better to stop service before attempting to store incorrect data in database.
Describe the solution you'd like
After loading yaml files with configuration, run validation (joi?) before next step.
If validation fails, log the problems, stop loading data from this file and set exit code to 1. The service should still load data from other config files.
Describe alternatives you've considered
none considered yet
Additional context
Create validation rules for config files based on documentation, sample config files, mongoDb schemas and other clues in code.
Is your feature request related to a problem? Please describe. When loading config files in initial-data-load, we assume, the config is in correct format. If there is a misconfiguration, it is found later in process and does not indicate the real problem in error logs. Also it is better to stop service before attempting to store incorrect data in database.
Describe the solution you'd like After loading yaml files with configuration, run validation (joi?) before next step. If validation fails, log the problems, stop loading data from this file and set exit code to 1. The service should still load data from other config files.
Describe alternatives you've considered none considered yet
Additional context Create validation rules for config files based on documentation, sample config files, mongoDb schemas and other clues in code.