pyms icon indicating copy to clipboard operation
pyms copied to clipboard

Is there a standarized way to validate configuration?

Open alexppg opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. It would be useful that before trying to start a MS, pyms checks that the configuration is using is valid. I understand that in here https://github.com/python-microservices/pyms/blob/1fb46cea82530d73d9db376d54428fea7e8ae99c/pyms/config/conf.py#L51 there's some kind of validation. But it seems on high level, it doesn't validate per service, for example.

Describe the solution you'd like I'd like that every service states clearly its configuration schema and that this can be validated at when starting the microservice.

alexppg avatar Oct 31 '20 19:10 alexppg

@avara1986 Hey, would it be interesting this feature using https://github.com/keleshev/schema? It seems pretty interesting. This way, the configuration that a service (or whatever) supports would be explicit, right now it's kind of implicit or to see it, you have to go to inspect the service's code.

alexppg avatar Feb 12 '21 22:02 alexppg

Also, not sure if related to this, but I think there should be a general way to set some sane defaults for all modules.

alexppg avatar Feb 13 '21 22:02 alexppg