Understanding Configu's Types
One of the core values of Configu is its ability to validate and enforce types for your configurations. Configu's types help guard against accidents in configuration updates, and makes your schema easier for humans to understand.
To manage this, Configu implements the following type allowances in configuration objects, which is what schemas become once pushed:
Primitive, basic types like numbers, strings, booleans, hex and others are valiadtaed based purely on their content. If your schema declares a number and you give it a string, Configu will issue an error, and you won't be able to validate or push the configuration until you fix it.
Patterns, which are needed to fulfill additional expectations for types like regex. A Pattern is needed for any type that can't be checked against itself or a pre-defined pattern (e.g. email, mobile phone number)
Templates, which are patterns that combine multiple values from the current schema or others schemas along with other characters, e.g. in order to build a query URL to fetch a feed.
Configu schemas also promote human discovery by including a note field for every key. Notes are optional but strongly encouraged, even if the schema seems obvious right now.
Table Of Available Types
For convenience and reference, we keep the table below up-to-date with the different types that Configu supports.
Fields identified in the "Also Requires" column indicate additional data that you need to specify
in order to use a certain type. For instance, using the "Regex" type requires "pattern" also be
specified. We recommend that
note be specified for human-friendly lookup with every Schema key;
the table below shows what's mandatory.
|UUID||None||Any generated UUID|
|MobilePhone||None||+1 000 000 0000|
|LatLong||None||41 24.2028, 2 10.4418|
|Base16||None||A Base16 Encoded Value|
|Base64||None||A Base64 Encoded Value|
|Hex||None||A Hex Encoded Value|
|MD5||None||A MD5 Hashed Value|
|SHA||None||A SHA Hashed Value|
|REF||None||A Reference Value|