A config value matches its declared type
R6.d through R6.h are one check with several arms. They share a code and a locator and stop at the first violation, so a reader of the result sees at most one error per config key.
The rule
- A config value whose type does not match the
typeits schema declares MUST be refused withR6_CONFIG_INVALIDatnode.{id}.config.{key}, where{id}is the node's id and{key}the config key. - A schema that declares no
typeimposes no type constraint, and the value MUST NOT be refused for its type, as in JSON Schema. - A
typethat names no JSON Schema type makes the schema invalid; that is the node type's failure (SCH-24), and R6.j applies. - R6.d to R6.h MUST all raise this same code at this same locator.
- They MUST be evaluated in one fixed order (type, then
enum, thenminimum,maximum,minLength,maxLength,pattern), stopping at the first violation, so one config key never yields more than one error. - Stopping early decides which error is reported, never whether the value is refused.
- The arms are distinguished by the error's message, not by its code.
What it means
The type check follows JSON Schema. A schema that leaves type out imposes no
type constraint, so any value passes it. A schema whose type names something
JSON Schema does not know, such as "uuid", is not a valid schema at all. That
is a defect in the node type, not in the workflow: the node type cannot be built
(SCH-24), and its config is not judged against a schema it does not have (R6.j).
The author is never charged with an error they cannot fix.
R6.d shares its code and locator with R6.e through R6.h, and all five run in one fixed order, type first, stopping at the first violation. A value that breaks two of them at once is charged with one error, for the constraint checked earliest. Stopping early changes which error the author reads, never whether the value is refused.
Example
{"untyped": {}}{"untyped": ["anything"]}A schema with no type holds the value to no type, as JSON Schema does.