...
Note that each configuration element should have an object for a value, and that this object must define the default for that element. Do not do this:
? defineConfigSchema("@openmrs/esm-hologram-doctor",
? hologram: {
? salutation: "Some friendly default salutation! ? this is wrong!"
? })
The following names are reserved and cannot be used as config keys: default
, validators
, and arrayElements
. Doing so will result in undefined behavior. Do not do this:
? defineConfigSchema("@openmrs/esm-hologram-doctor",
? hologram: {
? salutation: {
? default: {
? default: "Greetings ? this is bad don't do it"
?
}}})
Validators
You should provide validators for your configuration elements wherever possible. This reduces the probability that implementers using your module will have hard-to-debug runtime errors. It gives you, the module developer, the opportunity to provide implementers with very helpful explanations about why their configuration won't work.
...