...
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:
?BAD defineConfigSchema("@openmrs/esm-hologram-doctor",
BAD hologram: {
BAD salutation: "Some friendly default salutation! ? this is wrong!"
BAD })
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:
BAD defineConfigSchema("@openmrs/esm-hologram-doctor",
BAD hologram: {
BAD salutation: {
BAD default: {
BAD default: "Greetings ? this is bad don't do it"
BAD }}})
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.
...