Reputation: 480
I have a configuration file and want to standardize the keys. So when other developers create their own configurations, they will be validated.
When using programming languages you use interfaces.
I also know that somehow some YAML-based Tools like Ansible also have defaults/definitions to ensure you are writing your stuff correctly. But as far as I know, they also work with addons and such...
So is there are a way to achieve this kind of effect in YAML files?
I mean I could programmatically validate it somehow, but maybe there is something better.
Upvotes: 2
Views: 911
Reputation: 39738
You have two options:
Ansible (and lots of other YAML-based frameworks) isn't really a good example because it uses Jinja on top of YAML and therefore is far more complex to validate.
Upvotes: 1