Skip to content

Instantly share code, notes, and snippets.

@manuschillerdev
Created April 6, 2023 09:14
Show Gist options
  • Save manuschillerdev/7d64b88c64dc95accd8878efa588ccde to your computer and use it in GitHub Desktop.
Save manuschillerdev/7d64b88c64dc95accd8878efa588ccde to your computer and use it in GitHub Desktop.
test
{
"version": 1,
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ibanComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"placeholder": {
"type": "string",
"description": "Text displayed if no value has been entered into the input field"
},
"component": {
"type": "string",
"const": "iban"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"name",
"component"
],
"additionalProperties": false
},
"yearComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"placeholder": {
"type": "string",
"description": "Text displayed if no value has been entered into the input field"
},
"component": {
"type": "string",
"const": "year"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"expression": {
"type": "string",
"description": "Simple expression to calculate this field's output."
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"minYear": {
"type": "number",
"description": "The minimum year the user will be allowed to type into the field. Setting minYear does not automatically add a validation rule."
},
"maxYear": {
"type": "number",
"description": "The maximum year the user will be allowed to type into the field. Setting maxYear does not automatically add a validation rule."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"defaultValue": {
"type": "number",
"description": "Default value to apply when the data does not contain a value."
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"component"
],
"additionalProperties": false
},
"dateComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"placeholder": {
"type": "string",
"description": "Text displayed if no value has been entered into the input field"
},
"component": {
"type": "string",
"enum": [
"date",
"daterange"
]
},
"useTime": {
"type": "boolean",
"description": "Flag to indicate if time input should be possible"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"name",
"component"
],
"additionalProperties": false
},
"numberComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"placeholder": {
"type": "string",
"description": "Text displayed if no value has been entered into the input field"
},
"unit": {
"type": "string",
"description": "An additional label showing the unit of the input field's value."
},
"decimalPlaces": {
"type": "integer",
"description": "Specifies the number of decimal places that should be used for the input. Defaults to 0."
},
"component": {
"type": "string",
"const": "number"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"expression": {
"type": "string",
"description": "Simple expression to calculate this field's output."
},
"defaultValue": {
"type": "number",
"description": "Default value to apply when the data does not contain a value."
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"component"
],
"additionalProperties": false
},
"textComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"placeholder": {
"type": "string",
"description": "Text displayed if no value has been entered into the input field"
},
"component": {
"type": "string",
"enum": [
"text",
"textarea"
]
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"expression": {
"type": "string",
"description": "Simple expression to calculate this field's output."
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"maxLength": {
"type": "number",
"description": "The maximum number of characters the user will be allowed to type into the field. Setting maxLength does not automatically add a validation rule."
},
"defaultValue": {
"type": "string",
"description": "Default value to apply when the data does not contain a value."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"component"
],
"additionalProperties": false
},
"outputComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object. Do not use 'expression' and 'name' at the same time."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"component": {
"type": "string",
"const": "output"
},
"expression": {
"type": "string",
"description": "Simple expression to calculate this field's output."
},
"format": {
"type": "string",
"description": "Custom format for number output. Supports the same patterns as the UXF Runtime's LocalizationService."
}
},
"required": [
"component"
],
"additionalProperties": false
},
"checkboxComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"checkboxLabel": {
"type": "string",
"description": "An additional label displayed to the right of the checkbox."
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"component": {
"type": "string",
"const": "checkbox"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"defaultValue": {
"type": "boolean",
"description": "Default value to apply when the data does not contain a value."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"name",
"component"
],
"additionalProperties": false
},
"toggleswitchComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"toggleSwitchLabel": {
"type": "string",
"description": "An additional label displayed to the right of the toggle switch."
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"component": {
"type": "string",
"const": "toggleswitch"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"defaultValue": {
"type": "boolean",
"description": "Default value to apply when the data does not contain a value."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"name",
"component"
],
"additionalProperties": false
},
"countComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"unit": {
"type": "string",
"description": "Additional unit to show for the input field"
},
"min": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
],
"description": "Mininum allowed value. Either a constant value or an expression pointing to a value in the form data."
},
"max": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
],
"description": "Maximum allowed value. Either a constant value or an expression pointing to a value in the form data."
},
"writable": {
"type": "boolean"
},
"component": {
"type": "string",
"const": "count"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"defaultValue": {
"type": "number",
"description": "Default value to apply when the data does not contain a value."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"name",
"component"
],
"additionalProperties": false
},
"hourComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"placeholder": {
"type": "string",
"description": "Text displayed if no value has been entered into the input field"
},
"component": {
"type": "string",
"const": "hour"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"expression": {
"type": "string",
"description": "Simple expression to calculate this field's output."
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"defaultValue": {
"type": "number",
"description": "Default value to apply when the data does not contain a value."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"component"
],
"additionalProperties": false
},
"amountComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"placeholder": {
"type": "string",
"description": "Text displayed if no value has been entered into the input field"
},
"currencyOptions": {
"type": "array",
"items": {
"type": "string"
}
},
"component": {
"type": "string",
"const": "amount"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"expression": {
"type": "string",
"description": "Simple expression to calculate this field's output."
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"defaultValue": {
"$ref": "#/definitions/amountType",
"description": "Default value to apply when the data does not contain a value."
},
"allowNegative": {
"type": "boolean",
"description": "Flag to allow input of negative values"
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"component"
],
"additionalProperties": false
},
"selectComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"options": {
"$ref": "#/definitions/selectOptions"
},
"prompt": {
"type": "string",
"description": "The given value is prepended to the list of `options` as a label with an empty value. Useful for entries like `Please select a value...`"
},
"backendOptionsType": {
"type": "string",
"description": "The type of values to load from the backend and offer as options."
},
"component": {
"type": "string",
"enum": [
"select",
"multiselect",
"checkboxgroup"
]
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"defaultValue": {
"$ref": "#/definitions/selectOption",
"description": "Default value to apply when the data does not contain a value."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"oneOf": [
{
"required": [
"name",
"component",
"options"
]
},
{
"required": [
"name",
"component",
"backendOptionsType"
]
}
],
"additionalProperties": false
},
"autocompleteComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"backendSuggestionsType": {
"type": "string",
"description": "The type of values to load from the backend as suggestions."
},
"maxSuggestions": {
"type": "number",
"description": "Maximum number of suggestions to retrieve, defaults to 10."
},
"minQueryLength": {
"type": "number",
"description": "Minimum number of character to type before retrieving the suggestions, defaults to 1."
},
"component": {
"type": "string",
"const": "autocomplete"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"required": [
"name",
"component",
"backendSuggestionsType"
],
"additionalProperties": false
},
"radiogroupComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"options": {
"$ref": "#/definitions/selectOptions"
},
"backendOptionsType": {
"type": "string",
"description": "The type of values to load from the backend and offer as options."
},
"component": {
"type": "string",
"const": "radiogroup"
},
"horizontal": {
"type": "boolean",
"description": "If true, radio buttons will be laid out in a row instead of below each other. Should only be used if group contains no more than 3 options with short labels."
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"defaultValue": {
"$ref": "#/definitions/selectOption",
"description": "Default value to apply when the data does not contain a value."
},
"validation": {
"type": "array",
"items": {
"$ref": "#/definitions/validationRule"
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
}
},
"oneOf": [
{
"required": [
"name",
"component",
"options"
]
},
{
"required": [
"name",
"component",
"backendOptionsType"
]
}
],
"additionalProperties": false
},
"sliderComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the form element. This is also used as the property name in the data object."
},
"label": {
"type": "string",
"description": "The label displayed for the form element. Defaults to <name>.label"
},
"help": {
"type": "string",
"description": "A short info message displayed below the input"
},
"min": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
],
"description": "Mininum allowed value. Either a constant value or an expression pointing to a value in the form data."
},
"max": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
],
"description": "Maximum allowed value. Either a constant value or an expression pointing to a value in the form data."
},
"component": {
"type": "string",
"const": "slider"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevent of modification"
},
"expression": {
"type": "string",
"description": "Simple expression to calculate this field's output."
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
},
"defaultValue": {
"type": "number",
"description": "Default value to apply when the data does not contain a value."
},
"showInput": {
"type": "boolean",
"description": "Show an additional input field next to the slider."
},
"valueFormat": {
"type": "string",
"description": "Format to use display the value in the additional input field."
},
"unit": {
"type": "string",
"description": "Unit to use in the additional input field."
},
"step": {
"type": "number",
"description": "Distance to use between steps."
},
"scale": {
"type": "array",
"description": "Scale to use for the slider steps. The array specifies the factor to use for the given number of steps.",
"items": {
"$ref": "#/definitions/sliderScale"
}
}
},
"required": [
"min",
"max",
"component"
],
"additionalProperties": false
},
"sliderScale": {
"type": "object",
"properties": {
"steps": {
"type": "integer",
"description": "Number of steps to use with the given factor."
},
"factor": {
"type": "integer",
"description": "Factor to use to multiple / divide the given values."
}
},
"required": [
"steps",
"factor"
],
"additionalProperties": false
},
"rowComponent": {
"type": "object",
"properties": {
"component": {
"type": "string",
"const": "row"
},
"label": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/formElement"
}
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"spaceDistribution": {
"description": "Can be used to change how much space the components are given to render themselves. Values can be given as a percentage in steps of 10.",
"type": "array",
"items": {
"type": "number",
"enum": [
10,
20,
30,
40,
50,
60,
70,
80,
90
]
}
}
},
"required": [
"component",
"fields"
]
},
"linkComponent": {
"type": "object",
"properties": {
"component": {
"type": "string",
"const": "link"
},
"label": {
"type": "string"
},
"url": {
"type": "string",
"description": "The URL the link points to. Absolute URLs are preferred."
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"sameWindow": {
"type": "boolean",
"description": "If sameWindow is true, the link will be opened in the same window as it is displayed. Defaults to false."
}
}
},
"fieldsetComponent": {
"type": "object",
"properties": {
"component": {
"type": "string",
"const": "fieldset"
},
"label": {
"type": "string"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"fields": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/formElement"
},
{
"$ref": "#/definitions/rowComponent"
},
{
"$ref": "#/definitions/fieldsetComponent"
},
{
"$ref": "#/definitions/collapsibleComponent"
},
{
"$ref": "#/definitions/optionpaneComponent"
}
]
}
}
},
"required": [
"component",
"fields"
],
"additionalProperties": false
},
"collapsibleComponent": {
"type": "object",
"properties": {
"component": {
"type": "string",
"const": "collapsible"
},
"label": {
"type": "string"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"fields": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/formElement"
},
{
"$ref": "#/definitions/rowComponent"
},
{
"$ref": "#/definitions/fieldsetComponent"
},
{
"$ref": "#/definitions/optionpaneComponent"
}
]
}
},
"type": {
"type": "string",
"enum": [
"form",
"accordion"
],
"description": "Specifies the type of collapsible"
},
"titleExpression": {
"type": "string",
"description": "An expression defining an additional value to display in the title section"
},
"titleFormat": {
"type": "string",
"description": "A format string to use to reformat the calculated value in the title section"
},
"initiallyOpened": {
"type": "boolean",
"description": "Flag to specify the initial opening state. Defaults to true."
}
},
"required": [
"component",
"fields"
],
"additionalProperties": false
},
"conditionalComponent": {
"type": "object",
"properties": {
"component": {
"type": "string",
"const": "conditional"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"fields": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/formElement"
},
{
"$ref": "#/definitions/rowComponent"
},
{
"$ref": "#/definitions/fieldsetComponent"
},
{
"$ref": "#/definitions/collapsibleComponent"
},
{
"$ref": "#/definitions/optionpaneComponent"
}
]
}
}
},
"required": [
"component",
"displayIf",
"fields"
],
"additionalProperties": false
},
"listComponent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "JSON path pointing to the data"
},
"component": {
"type": "string",
"const": "list"
},
"minLength": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "Minimum number of entries in the list, defaults to 0. Either a constant value or an expression pointing to a value in the form data."
},
"maxLength": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "Maximum number of entries in the list, defaults to unlimited. Either a constant value or an expression pointing to a value in the form data."
},
"listLabel": {
"type": "string",
"description": "Label for the control to add new list entries."
},
"entryLabel": {
"type": "string",
"description": "Optional label for the wrapper around the single list entries."
},
"removable": {
"type": "boolean",
"description": "Flag to indicate that entry can be removed from the list, defaults to true."
},
"extensible": {
"type": "boolean",
"description": "Flag to indicate that entry can be added to the list, defaults to true."
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"readOnly": {
"type": "boolean",
"description": "Prevents modification"
},
"fields": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/formElement"
},
{
"$ref": "#/definitions/rowComponent"
},
{
"$ref": "#/definitions/fieldsetComponent"
},
{
"$ref": "#/definitions/collapsibleComponent"
},
{
"$ref": "#/definitions/optionpaneComponent"
}
]
}
}
},
"required": [
"component",
"name",
"fields",
"listLabel"
],
"additionalProperties": false
},
"formElement": {
"oneOf": [
{
"$ref": "#/definitions/ibanComponent"
},
{
"$ref": "#/definitions/dateComponent"
},
{
"$ref": "#/definitions/textComponent"
},
{
"$ref": "#/definitions/numberComponent"
},
{
"$ref": "#/definitions/amountComponent"
},
{
"$ref": "#/definitions/countComponent"
},
{
"$ref": "#/definitions/checkboxComponent"
},
{
"$ref": "#/definitions/toggleswitchComponent"
},
{
"$ref": "#/definitions/linkComponent"
},
{
"$ref": "#/definitions/sliderComponent"
},
{
"$ref": "#/definitions/selectComponent"
},
{
"$ref": "#/definitions/autocompleteComponent"
},
{
"$ref": "#/definitions/radiogroupComponent"
},
{
"$ref": "#/definitions/conditionalComponent"
},
{
"$ref": "#/definitions/outputComponent"
},
{
"$ref": "#/definitions/textblockComponent"
},
{
"$ref": "#/definitions/hourComponent"
},
{
"$ref": "#/definitions/yearComponent"
}
]
},
"optionpaneValue": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/formElement"
}
}
},
"required": [
"fields",
"label",
"value"
]
},
"selectOptions": {
"type": "array",
"description": "List of options the user can select from",
"items": {
"$ref": "#/definitions/selectOption"
}
},
"selectOption": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "object",
"properties": {
"value": {
"description": "The value to write into the data object when the option is select."
},
"label": {
"type": "string",
"description": "The label to display to the user."
},
"displayIf": {
"type": "string",
"description": "Optional condition to check before offering this option."
}
},
"required": [
"value",
"label"
],
"additionalProperties": false
}
]
},
"optionpaneComponent": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"displayIf": {
"type": "string",
"description": "Simple expression checked against the form values to determine if the component should be rendered."
},
"visibleFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to see this component."
},
"editableFor": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of roles which are allowed to edit the value of this component."
},
"disabled": {
"type": "boolean",
"description": "Disabled indicates that the component is not available for interaction."
},
"component": {
"type": "string",
"const": "optionpane"
},
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/optionpaneValue"
}
},
"defaultValue": {
"type": "string",
"description": "Default pane to activate when the data does not contain a value."
},
"refExternalData": {
"type": "string",
"description": "Reference of an external data source to give a hint for mapping data."
}
},
"required": [
"name",
"component",
"options"
]
},
"textblockComponent": {
"type": "object",
"properties": {
"component": {
"type": "string",
"const": "textblock"
},
"type": {
"type": "string",
"enum": [
"plain",
"markdown"
]
},
"text": {
"type": "string",
"description": "Text to display in the component, either plain text or in markdown syntax, depending on the 'type' property."
},
"translationKey": {
"type": "string",
"description": "Key to use to lookup the text to display in the current translation context."
}
},
"oneOf": [
{
"required": [
"text"
]
},
{
"required": [
"translationKey"
]
}
],
"additionalProperties": false
},
"validationRule": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of validation to perform.",
"enum": [
"mandatory",
"email",
"url",
"iban",
"regexp",
"minValue",
"maxValue",
"minDate",
"maxDate",
"minSelected",
"maxSelected",
"minLength",
"maxLength"
]
},
"message": {
"type": "string"
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"offset": {
"type": "object",
"properties": {
"day": {
"type": "number"
},
"month": {
"type": "number"
},
"year": {
"type": "number"
}
}
},
"offsetReference": {
"type": "string",
"description": "Expression to lookup a reference to use for offset based date validation"
},
"pattern": {
"type": "string",
"description": "Regular expression to check a string against"
},
"soft": {
"type": "boolean",
"description": "Soft validation rules will produce warnings instead of errors. Default is hard validation (producing errors)."
},
"validateIf": {
"type": "string",
"description": "Optional simple expression checked against the form values to determine if the validation should be performed."
}
},
"additionalProperties": false,
"required": [
"type"
]
},
"backendValidationRule": {
"properties": {
"type": {
"type": "string",
"description": "Type of validation to perform."
},
"path": {
"type": "string",
"description": "Optional path pointing to the data which should be validated."
},
"validateIf": {
"type": "string",
"description": "Optional simple expression checked against the form values to determine if the validation should be performed."
},
"paramsIn": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional input mapping: All field names provided here are extracted from the data json and provided to the validation backend as an array. If not provided, the whole data json is provided to the validation backend."
},
"paramsOut": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional output mapping: the response of the validation backend is expected to be an array of values which are then merged into the current data json using the provided field names in this parameter. If not provided, the data json is not updated."
}
},
"required": [
"type"
]
},
"amountType": {
"properties": {
"value": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "The value of the amount, either a number or a string containing a bigdecimal"
},
"currency": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "ISO currency code"
}
},
"required": [
"code"
]
}
},
"description": "An amount object encapsulates a value and a currency",
"required": [
"value",
"currency"
]
},
"constant": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the constant. It is treated as a path into the data JSON, so if the name contains '.', it will set the corresponding nested property."
},
"value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "object"
}
],
"description": "A literal value for the constant. If you do not specify a value, the constant's value is taken from the initial data passed to the API during form instantiation. "
}
},
"required": [
"name"
]
}
},
"type": "object",
"properties": {
"version": {
"type": "number",
"description": "The version of the CLX Dynamic Forms JSON schema used by this form model"
},
"fields": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/formElement"
},
{
"$ref": "#/definitions/fieldsetComponent"
},
{
"$ref": "#/definitions/collapsibleComponent"
},
{
"$ref": "#/definitions/rowComponent"
},
{
"$ref": "#/definitions/optionpaneComponent"
}
]
}
},
"backendValidation": {
"type": "array",
"items": {
"$ref": "#/definitions/backendValidationRule"
}
},
"constants": {
"type": "array",
"items": {
"$ref": "#/definitions/constant"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment