-
Notifications
You must be signed in to change notification settings - Fork 94
Configuration Specs
The Configuration Spec takes the general form:
{
"minimumCount": { "type": "int", "defaultValue": 1 },
"showMissing": { "type": "boolean", "defaultValue": true },
"missingLabel": { "type": "text" }
};
{ "type": "int", "defaultValue": 1 }
{ "type": "text" }
{ "type": "boolean", "defaultValue": true },
List fields take any of the types above (e.g., boolean
, text
, int
, etc) but also take a dimension field
{ "type": "boolean", "defaultValue": true, "dimension": 3 },
This would attempt to parse the value as a comma-separated list. It will result in a 3-element array. If the comma-separated list contains more than three elements, only the first three will be used. If it contains less, the remaining will be filled with the defaultValue (or null if no defaultValue is specified).
If the dimension is an asterisks, it means the resulting list will be however long the comma-separated list is. If the value is the empty string, it will be an empty list.
{ "type": "boolean", "defaultValue": true, "dimension": "*" },
Sometimes it may be useful to have a setting loaded from an attribute different than the setting name. The following will load the setting FOO from the attribute BAR:
"FOO": { "type": "text", "attributeName": "BAR" },