Skip to content

JSON schema keyword support

Felix Neubauer edited this page Oct 8, 2024 · 3 revisions

MetaConfigurator supports JSON schema version 2020-12, although our GUI editor does not fully support all keywords of this draft. This table shows the support status for all keywords. Not that we use ajv for schema validation, so for the validation, all keywords are fully supported.

Keyword Support status Remarks
$ref partial No support for references to URLs or local files,
$anchor not supported
$dynamicRef not supported
$dynamicAnchor not supported
$comment full Shown in the tooltip.
prefixItems not supported
items full
contains full Only relevant for schema validation.
additionalProperties full Users can add new properties to objects.
properties full Properties are shown in the GUI editor.
patternProperties full Users can add new properties to objects.
dependentSchemas full Dependent schemas are applied depending on the data.
propertyNames full Only used in schema validation.
if full if the if-schema is valid, the then schema is applied, otherwise the else schema
then full
else full
allOf partial merging allfs is limited to some keywords, we use the mergeAllOf library
anyOf partial users can select multiple sub-schemas that should be applied. Usage in combination with oneOf is not supported.
oneOf partial users can select a sub-schema that should be applied. A pre-selection is made that matches the data.
not not supported
unevaluatedItems not supported
unevaluatedProperties not supported
type full Depending on the type, a corresponding component is shown to edit a property, e.g., a text field for strings. Type unions are converted to oneOfs.
const full Shown as drop-down with one entry.
enum full Shown as drop-down with the possible values as entries.
multipleOf full Used for validation and for the increment/decrement buttons of numeric text fields.
maximum full Only relevant for schema validation.
exclusiveMaximum full Only relevant for schema validation.
minimum full Only relevant for schema validation.
exclusiveMinimum full Only relevant for schema validation.
maxLength full Only relevant for schema validation.
minLength full Only relevant for schema validation.
pattern full Only relevant for schema validation.
maxItems full Users cannot add items to arrays that already reached their maximum number of items (in the GUI editor).
minItems full Only relevant for schema validation.
uniqueItems full Only relevant for schema validation.
maxContains full Only relevant for schema validation.
minContains full Only relevant for schema validation.
maxProperties full Users cannot add properties to objects that already reached the maximum number of properties (in the GUI editor).
minProperties full Only relevant for schema validation.
required full Required properties are marked with an asterisk and cannot be deleted in the GUI editor.
dependentRequired full If necessary, the dependent required properties are marked with an asterisk and cannot be deleted in the GUI editor.
title full Shown in the tooltip.
description full Shown in the tooltip.
default full Shown in the tooltip and potentially used as placeholder for the input fields.
deprecated full Shown as strike-through.
readOnly not supported Usually not relevant for editing files.
writeOnly not supported Usually not relevant for editing files.
examples full Shown in the tooltip. If two or more examples are given, a drop-down is used as component so the user can select on of the examples.
format partial Only used in validation, no format specific components.
contentEncoding not supported
contentMediaType not supported Only schema validation.
contentSchema not supported Only schema validation.
dependencies not supported Deprecated in draft 2020-12, will not be supported.
$recursiveAnchor not supported Deprecated in draft 2020-12, will not be supported.
$recursiveRef not supported Deprecated in draft 2020-12, will not be supported.
Clone this wiki locally