Combining schemas

JSON schema includes keywords for combining schemas. This is useful when using a value to simultaneously validate against multiple criteria. These keywords are mostly used with $ref nodes.

Combined schemas are displayed as a combined data structure on the Translation Configurator JSON tree.

Because the parent can have the same name as the children, it is difficult to know which child belongs to which parent.

To eliminate name collision that can happen if multiple child schemas share an element name, the parent-child relationship is enforced on these type nodes by displaying individual nodes.

If the individual node is a reference, then the indexes under these nodes are named with the definition name; otherwise, the node uses the index name.

The index node name is added to the translation source and destination address using the “.” separator.

You can use these keywords to combine schemas:

Keyword Condition
allOf Must be valid against all of the sub-schemas
anyOf Must be valid against any of the sub-schemas
oneOf Must be valid against exactly one of the sub-schemas