{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "$id": "http://dynatrace.com/schemas/1/SettingsSchemaApps",
  "type": "object",
  "properties": {
    "enums": {
      "description": "Custom enums that can be referenced by properties.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/EnumType"
      }
    },
    "types": {
      "title": "Custom types that can be referenced by properties.",
      "description": "Order is relevant: only refer to types that have already been defined.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ComplexType"
      }
    },
    "dynatrace": {
      "title": "The Dynatrace API level.",
      "description": "Semantic version `x.y.z`, has to be increased when there are changes in this schema spec itself.",
      "type": "string",
      "minLength": 1,
      "pattern": "^\\d+(\\.\\d+)*$",
      "enum": ["1"]
    },
    "$schema": {
      "title": "The meta-schema this schema complies to.",
      "description": "URL pointing to this meta-schema. Setting this enables validation of the schema and suggestions in many IDEs.",
      "type": "string",
      "format": "uri"
    },
    "schemaId": {
      "title": "The unique identifier for this schema.",
      "description": "Like a java package declaration.",
      "type": "string",
      "pattern": "^[-a-z0-9.]+$",
      "maxLength": 195
    },
    "version": {
      "title": "The version of this schema.",
      "description": "Semantic version `x.y.z`, defaults to `0`, has to be increased when properties are added/removed or structurally modified (type, nullable).",
      "type": "string",
      "minLength": 1,
      "pattern": "^\\d+(\\.\\d+)*$",
      "default": "0"
    },
    "versionInfo": {
      "title": "Information about the version of this schema.",
      "description": "Defaults to empty string.",
      "type": "string",
      "default": ""
    },
    "autoMigratable": {
      "title": "Whether persisted values should be repaired to the most current schema version.",
      "description": "Defaults to `always`. When set to `never`, it is also possible to register older schema versions out of order.",
      "type": "string",
      "enum": ["always", "never"],
      "default": "always"
    },
    "displayName": {
      "title": "The human-friendly name of the schema.",
      "description": "Defaults to `schemaId` in the code-api.",
      "type": "string"
    },
    "description": {
      "title": "The human-friendly description of the schema.",
      "description": "Short description of what this schema is used for.",
      "type": "string",
      "default": ""
    },
    "schemaGroups": {
      "title": "Names of the groups, which this schema belongs to.",
      "description": "Names of the groups, which this schema belongs to.",
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^(group:[-a-z0-9.:]*)?$"
      },
      "default": []
    },
    "documentation": {
      "title": "Additional documentation of the schema.",
      "description": "Additional information about the schema, explanation of semantics of its values.",
      "type": "string",
      "default": ""
    },
    "metadata": {
      "title": "The meta data of the schema.",
      "description": "The element can contain an arbitrary number of well-known properties.",
      "$ref": "#/$defs/MetaData"
    },
    "uiCustomization": {
      "title": "UI customization for the items.",
      "description": "This makes it possible to customize how the UI renders values, depending on the type of value different customization options are available.",
      "$ref": "#/$defs/UiCustomization"
    },
    "multiObject": {
      "title": "If the schema allows more than one object to be persisted.",
      "description": "Multiple (`true`) objects are permitted or a single (`false`) object is permitted.",
      "type": "boolean",
      "default": false
    },
    "ordered": {
      "title": "If the order of objects has semantic significance.",
      "description": "Only applicable when `multiObject` is set to `true`.",
      "type": "boolean"
    },
    "maxObjects": {
      "title": "The limit for the number of items for a `multiObject` config.",
      "description": "Defaults to `1` for `multiObject`=`false`, otherwise `100`.",
      "type": "integer",
      "format": "int32",
      "minimum": 1,
      "maximum": 1000,
      "default": 1
    },
    "summaryPattern": {
      "title": "Pattern with references to properties to create a markdown summary for the value.",
      "description": "Defaults to empty string, mandatory for `multiObject` configs. Markdown symbols need to be escaped if they are to be displayed normally.",
      "type": "string",
      "default": ""
    },
    "searchPattern": {
      "title": "Pattern with references to properties to create a searchable string for the value.",
      "description": "If not specified the summaryPattern is used for search.",
      "type": "string"
    },
    "properties": {
      "title": "The properties this config is constructed of.",
      "description": "Order is relevant for UI, not for serialization.",
      "type": "object",
      "minProperties": 1,
      "additionalProperties": {
        "$ref": "#/$defs/Property"
      }
    },
    "constraints": {
      "description": "Container validation constraints the type values must fulfill to be persistable.",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/ContainerConstraint"
          },
          {
            "$ref": "#/$defs/SecretResubmissionContainerConstraint"
          }
        ]
      }
    },
    "schemaConstraints": {
      "description": "Schema validation constraints the values as a whole must fulfill to be persistable.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/UniqueSchemaPropertiesConstraint"
      }
    },
    "deletionConstraints": {
      "description": "Validation constraints the values being deleted must fulfill.",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/CustomDeletionValidatorReferenceConstraint"
          },
          {
            "$ref": "#/$defs/ReferentialIntegrityDeletionConstraint"
          }
        ]
      }
    },
    "additionalProperties": {
      "description": "Additional properties defined by a schema extension.",
      "type": "object",
      "additionalProperties": true
    },
    "tableColumns": {
      "description": "Table column definitions for use in the ui.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/TableColumn"
      }
    },
    "ownerBasedAccessControl": {
      "title": "Enable access control based on owner of setting object",
      "type": "boolean",
      "default": false
    },
    "maturity": {
      "title": "Maturity of the settings schema",
      "description": "Schemas with IN_DEVELOPMENT or PREVIEW are hidden by default",
      "type": "string",
      "enum": ["IN_DEVELOPMENT", "PREVIEW", "EARLY_ADOPTER", "GENERAL_AVAILABILITY"],
      "default": "GENERAL_AVAILABILITY"
    }
  },
  "required": ["schemaId", "displayName", "description", "properties", "dynatrace"],
  "$defs": {
    "RefPointer": {
      "type": "object",
      "properties": {
        "$ref": {
          "type": "string"
        }
      },
      "required": ["$ref"],
      "additionalProperties": false
    },
    "EnumValue": {
      "type": "object",
      "properties": {
        "value": {
          "description": "Persisted value for the enum item",
          "type": "string"
        },
        "displayName": {
          "description": "The human-friendly name of the value.",
          "type": "string"
        },
        "description": {
          "description": "The human-friendly optional description of the value.",
          "type": "string"
        },
        "icon": {
          "description": "An optional barista icon that's displayed next to the value.",
          "type": "string"
        }
      },
      "required": ["value", "displayName"],
      "additionalProperties": false
    },
    "EnumType": {
      "type": "object",
      "properties": {
        "type": {
          "title": "The type of the referable object.",
          "description": "Always has to be `enum` for enum types.",
          "type": "string",
          "enum": ["enum"],
          "default": "enum"
        },
        "displayName": {
          "title": "The human-friendly name of the type.",
          "description": "Defaults to `id` in the code-api.",
          "type": "string"
        },
        "description": {
          "title": "The human-friendly description of the type.",
          "description": "Short description of what this type is used for.",
          "type": "string",
          "default": ""
        },
        "documentation": {
          "title": "Additional documentation of the type.",
          "description": "Additional information about the type, explanation of semantics of its values.",
          "type": "string",
          "default": ""
        },
        "checkForDuplicateDisplayNames": {
          "title": "If the displayNames of the items should be checked for duplicates.",
          "description": "Should only be set for enums that are used in combination with a datasource (so that no duplicates are ever displayed).",
          "type": "boolean",
          "default": true
        },
        "items": {
          "description": "Mapping from enum values to displayName.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/EnumValue"
          }
        }
      },
      "required": ["type", "items"],
      "additionalProperties": false
    },
    "MetaData": {
      "type": "object",
      "additionalProperties": {
        "description": "Arbitrary meta data.",
        "type": "string"
      }
    },
    "UiCustomization": {
      "type": "object",
      "properties": {
        "tabs": {
          "type": "object",
          "description": "UI customization options for defining tabs.",
          "properties": {
            "groups": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "description": "The human-friendly name of the group.",
                    "type": "string"
                  },
                  "description": {
                    "description": "The description of the group.",
                    "type": "string"
                  },
                  "properties": {
                    "description": "Array of properties of the group.",
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "required": ["displayName", "properties"],
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        },
        "expandable": {
          "type": "object",
          "description": "UI customization options for defining expandable sections.",
          "oneOf": [
            {
              "required": ["displayName"]
            },
            {
              "required": ["sections"]
            }
          ],
          "if": {
            "required": ["sections"]
          },
          "then": {
            "not": {
              "required": ["expanded"]
            }
          },
          "properties": {
            "displayName": {
              "description": "The human-friendly name of the expandable.",
              "type": "string"
            },
            "expanded": {
              "description": "Defines if expandable should be expanded by default.",
              "type": "boolean",
              "default": false
            },
            "sections": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "description": "The human-friendly name of the expandable section.",
                    "type": "string"
                  },
                  "expanded": {
                    "description": "Defines if section should be expanded by default.",
                    "type": "boolean",
                    "default": false
                  },
                  "description": {
                    "description": "The description of the expandable section.",
                    "type": "string"
                  },
                  "properties": {
                    "description": "Array of properties of the expandable section.",
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "required": ["displayName", "properties"],
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        },
        "table": {
          "description": "UI customization options for defining tables.",
          "type": "object",
          "properties": {
            "columns": {
              "description": "UI customization options for defining columns.",
              "type": "array",
              "items": {
                "type": "object",
                "anyOf": [
                  {
                    "required": ["type"]
                  },
                  {
                    "required": ["propertyRef"]
                  },
                  {
                    "required": ["builtinColumnRef"]
                  },
                  {
                    "required": ["columnRef"]
                  }
                ],
                "properties": {
                  "id": {
                    "description": "The id for this column used for filtering. Required for conflicting or pathed columns - otherwise the ref is used.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 16,
                    "pattern": "^[A-z_][A-z0-9_]*$"
                  },
                  "displayName": {
                    "description": "The human-friendly name of the column.",
                    "type": "string"
                  },
                  "type": {
                    "description": "The UI specific type which defines how a cell of this column will be displayed.",
                    "type": "string",
                    "anyOf": [
                      {
                        "enum": ["text", "float", "integer", "enum", "boolean"]
                      },
                      {}
                    ]
                  },
                  "items": {
                    "description": "The possible items of this column.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "description": "The value of this item.",
                          "type": "string"
                        },
                        "displayName": {
                          "description": "The display name of this item.",
                          "type": "string"
                        },
                        "icon": {
                          "description": "The icon of this item.",
                          "type": "string"
                        }
                      },
                      "required": ["value"],
                      "additionalProperties": false
                    }
                  },
                  "propertyRef": {
                    "description": "A reference to a child property which will be used for displaying the table cells.",
                    "type": "string"
                  },
                  "builtinColumnRef": {
                    "description": "The UI specific builtin column-implementation for this column.",
                    "type": "string",
                    "enum": ["summary", "enabled"]
                  },
                  "columnRef": {
                    "description": "The referenced column from the 'tableColumns' property of the schema for this column.",
                    "type": "string"
                  },
                  "width": {
                    "description": "The width this column should take up on the table.",
                    "type": "string",
                    "pattern": "^(([1-9][0-9]?%|100%)|([1-9][0-9]*))$"
                  }
                }
              }
            },
            "emptyState": {
              "description": "UiCustomization for defining an empty state for a table",
              "type": "object",
              "properties": {
                "text": {
                  "description": "The text to be shown in the empty state",
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "callback": {
          "type": "object",
          "description": "UI customization options for defining custom callbacks",
          "properties": {
            "buttons": {
              "description": "UI customization for defining buttons that call functions when pressed",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "description": "The label of the button",
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "description": "The description to be shown in a tooltip when hovering over the button",
                    "type": "string",
                    "minLength": 1
                  },
                  "identifier": {
                    "description": "The identifier of the function to be called when the button is pressed",
                    "type": "string",
                    "minLength": 1
                  },
                  "insert": {
                    "description": "The position where the button should be shown in the UI",
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "The absolute position of the button inside a settings object",
                        "enum": ["first", "last"]
                      },
                      {
                        "type": "object",
                        "description": "The position where the button should be shown relative to a property in the UI",
                        "properties": {
                          "after": {
                            "description": "The path of a property after which the button should be shown in the UI",
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": ["after"]
                      }
                    ]
                  }
                },
                "required": ["displayName", "identifier", "insert"],
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "Constraint": {
      "type": "object",
      "anyOf": [
        {
          "$ref": "#/$defs/LengthConstraint"
        },
        {
          "$ref": "#/$defs/RangeConstraint"
        },
        {
          "$ref": "#/$defs/NotBlankConstraint"
        },
        {
          "$ref": "#/$defs/NotEmptyConstraint"
        },
        {
          "$ref": "#/$defs/TrimmedConstraint"
        },
        {
          "$ref": "#/$defs/NoWhitespaceConstraint"
        },
        {
          "$ref": "#/$defs/RegexConstraint"
        },
        {
          "$ref": "#/$defs/PatternConstraint"
        },
        {
          "$ref": "#/$defs/CustomValidatorReferenceConstraint"
        }
      ],
      "if": {
        "properties": {
          "type": {
            "enum": ["PATTERN"]
          }
        }
      },
      "then": {
        "properties": {
          "pattern": {
            "pattern": "^\\^.*\\$$",
            "regexValidation": true
          }
        }
      }
    },
    "CollectionConstraint": {
      "type": "object",
      "anyOf": [
        {
          "$ref": "#/$defs/UniquePropertiesConstraint"
        }
      ]
    },
    "BaseConstraint": {
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        }
      }
    },
    "LengthConstraint": {
      "required": ["type", "maxLength"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["LENGTH"]
        },
        "maxLength": {
          "title": "Maximum string length.",
          "description": "For `type` = `LENGTH` and string values.",
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "maximum": 5000
        },
        "minLength": {
          "title": "Minimum string length.",
          "description": "For `type` = `LENGTH` and string values.",
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "maximum": 5000
        }
      },
      "additionalProperties": false
    },
    "RangeConstraint": {
      "required": ["type"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["RANGE"]
        },
        "maximum": {
          "title": "Maximum allowed value.",
          "description": "For `type` = `RANGE` and integer and floating-point numeric values.",
          "anyOf": [
            {
              "type": "integer",
              "format": "int64",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "number",
              "format": "double",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          ]
        },
        "minimum": {
          "title": "Minimum allowed value.",
          "description": "For `type` = `RANGE` and integer and floating-point numeric values.",
          "anyOf": [
            {
              "type": "integer",
              "format": "int64",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "number",
              "format": "double",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "NotBlankConstraint": {
      "required": ["type"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["NOT_BLANK"]
        }
      },
      "additionalProperties": false
    },
    "NotEmptyConstraint": {
      "required": ["type"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["NOT_EMPTY"]
        }
      },
      "additionalProperties": false
    },
    "TrimmedConstraint": {
      "required": ["type"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["TRIMMED"]
        }
      },
      "additionalProperties": false
    },
    "NoWhitespaceConstraint": {
      "required": ["type"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["NO_WHITESPACE"]
        }
      },
      "additionalProperties": false
    },
    "RegexConstraint": {
      "required": ["type"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["REGEX"]
        },
        "disallowDangerousRegex": {
          "title": "Whether to disallow usage of dangerous regexes",
          "description": "`true` - regex must be safe, `false` - unsafe regexes are allowed",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },
    "PatternConstraint": {
      "required": ["type", "pattern"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["PATTERN"]
        },
        "pattern": {
          "title": "Regular expression for valid values.",
          "description": "For `type` = `PATTERN` and string values.",
          "type": "string",
          "format": "regex"
        }
      },
      "additionalProperties": false
    },
    "CustomValidatorReferenceConstraint": {
      "required": ["type", "customValidatorId"],
      "not": {
        "required": ["timeout"]
      },
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["CUSTOM_VALIDATOR_REF"]
        },
        "customValidatorId": {
          "title": "The ID of a custom validator.",
          "description": "For `type` = `CUSTOM_VALIDATOR_REF`.",
          "type": "string"
        },
        "skipAsyncValidation": {
          "title": "Whether to skip validation on property change in the UI",
          "description": "`false` - validate on every change in the UI, `true` - validate only on save",
          "type": "boolean",
          "default": false
        },
        "timeout": {
          "title": "Timeout in seconds for the custom validation.",
          "description": "For `type` = `CUSTOM_VALIDATOR_REF`. Default is 5 s.",
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "maximum": 10,
          "default": 5
        }
      },
      "additionalProperties": false
    },
    "UniquePropertiesConstraint": {
      "required": ["type", "uniqueProperties"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["UNIQUE"]
        },
        "uniqueProperties": {
          "title": "The list of properties for which the combination of values needs to be unique.",
          "description": "For `type` = `UNIQUE`.",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "ContainerConstraint": {
      "type": "object",
      "anyOf": [
        {
          "$ref": "#/$defs/BiComparableContainerConstraint"
        },
        {
          "$ref": "#/$defs/CustomValidatorReferenceContainerConstraint"
        },
        {
          "$ref": "#/$defs/PropertyCountRangeContainerConstraint"
        }
      ]
    },
    "BaseContainerConstraint": {
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        }
      }
    },
    "BiComparableContainerConstraint": {
      "required": ["type", "properties"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the container validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["GREATER_THAN", "GREATER_THAN_OR_EQUAL", "LESS_THAN", "LESS_THAN_OR_EQUAL"]
        },
        "properties": {
          "title": "The referenced properties.",
          "description": "For `type` in [`GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`] exactly two properties are required.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 2,
          "maxItems": 2
        }
      },
      "additionalProperties": false
    },
    "CustomValidatorReferenceContainerConstraint": {
      "required": ["type", "customValidatorId"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the container validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["CUSTOM_VALIDATOR_REF"]
        },
        "customValidatorId": {
          "title": "The ID of a custom validator.",
          "description": "For `type` = `CUSTOM_VALIDATOR_REF`.",
          "type": "string"
        },
        "skipAsyncValidation": {
          "title": "Whether to skip validation on container change in the UI",
          "description": "`false` - validate on every change in the UI, `true` - validate only on save",
          "type": "boolean",
          "default": false
        },
        "timeout": {
          "title": "Timeout in seconds for the custom validation.",
          "description": "For `type` = `CUSTOM_VALIDATOR_REF`. Default is 5 s.",
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "maximum": 10,
          "default": 5
        }
      },
      "additionalProperties": false
    },
    "PropertyCountRangeContainerConstraint": {
      "required": ["type", "properties"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the container validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["PROPERTY_COUNT_RANGE"]
        },
        "properties": {
          "title": "The referenced properties.",
          "description": "For `type` in [for `type` = `PROPERTY_COUNT_RANGE` an arbitrary number of properties can be given.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "minimumPropertyCount": {
          "title": "The minimum number of properties that have to be set",
          "description": "For `type` = `PROPERTY_COUNT_RANGE`.",
          "type": "integer",
          "format": "int32"
        },
        "maximumPropertyCount": {
          "title": "The maximum number of properties that can be set.",
          "description": "For `type` = `PROPERTY_COUNT_RANGE`.",
          "type": "integer",
          "format": "int32"
        }
      },
      "additionalProperties": false
    },
    "Precondition": {
      "anyOf": [
        {
          "$ref": "#/$defs/RecursivePrecondition"
        },
        {
          "$ref": "#/$defs/NotPrecondition"
        },
        {
          "$ref": "#/$defs/EqualsPrecondition"
        },
        {
          "$ref": "#/$defs/InPrecondition"
        },
        {
          "$ref": "#/$defs/NullPrecondition"
        },
        {
          "$ref": "#/$defs/RegexMatchPrecondition"
        }
      ],
      "if": {
        "properties": {
          "type": {
            "enum": ["REGEX_MATCH"]
          }
        }
      },
      "then": {
        "properties": {
          "pattern": {
            "pattern": "^\\^.*\\$$",
            "regexValidation": true
          }
        }
      }
    },
    "RecursivePrecondition": {
      "type": "object",
      "properties": {
        "type": {
          "title": "The type of the precondition evaluation.",
          "description": "Type also defines which properties are required.",
          "type": "string",
          "enum": ["AND", "OR"]
        },
        "preconditions": {
          "title": "Preconditions to be combined in the evaluation.",
          "description": "For `type` in [`AND`, `OR`].",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Precondition"
          }
        }
      },
      "required": ["type", "preconditions"],
      "additionalProperties": false
    },
    "NotPrecondition": {
      "type": "object",
      "properties": {
        "type": {
          "title": "The type of the precondition evaluation.",
          "description": "Type also defines which properties are required.",
          "type": "string",
          "enum": ["NOT"]
        },
        "precondition": {
          "title": "Precondition to be negated in the evaluation.",
          "description": "For `type` = `NOT`.",
          "$ref": "#/$defs/Precondition"
        }
      },
      "required": ["type", "precondition"],
      "additionalProperties": false
    },
    "InPrecondition": {
      "type": "object",
      "properties": {
        "type": {
          "title": "The type of the precondition evaluation.",
          "description": "Type also defines which properties are required.",
          "type": "string",
          "enum": ["IN"]
        },
        "property": {
          "title": "Property on the same hierarchy level the precondition is evaluating.",
          "description": "For `type` in [`NULL`, `EQUALS`, `IN`, `REGEX_MATCH`].",
          "type": "string"
        },
        "expectedValues": {
          "title": "Valid values for the referred property.",
          "description": "For `type` = `IN`, type of values should match type of referenced property.",
          "type": "array",
          "uniqueItems": true,
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "string",
                "format": "time"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ]
          }
        }
      },
      "required": ["type", "property", "expectedValues"],
      "additionalProperties": false
    },
    "NullPrecondition": {
      "type": "object",
      "properties": {
        "type": {
          "title": "The type of the precondition evaluation.",
          "description": "Type also defines which properties are required.",
          "type": "string",
          "enum": ["NULL"]
        },
        "property": {
          "title": "Property on the same hierarchy level the precondition is evaluating.",
          "description": "For `type` in [`NULL`, `EQUALS`, `IN`, `REGEX_MATCH`].",
          "type": "string"
        }
      },
      "required": ["type", "property"],
      "additionalProperties": false
    },
    "EqualsPrecondition": {
      "type": "object",
      "properties": {
        "type": {
          "title": "The type of the precondition evaluation.",
          "description": "Type also defines which properties are required.",
          "type": "string",
          "enum": ["EQUALS"]
        },
        "property": {
          "title": "Property on the same hierarchy level the precondition is evaluating.",
          "description": "For `type` in [`NULL`, `EQUALS`, `IN`, `REGEX_MATCH`].",
          "type": "string"
        },
        "expectedValue": {
          "title": "Expected value of the referred property.",
          "description": "For `type` = `EQUALS`, type of value should match type of referenced property.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer",
              "format": "int64"
            },
            {
              "type": "number",
              "format": "double"
            },
            {
              "type": "boolean"
            },
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "string",
              "format": "date-time"
            }
          ]
        }
      },
      "required": ["type", "property", "expectedValue"],
      "additionalProperties": false
    },
    "RegexMatchPrecondition": {
      "type": "object",
      "properties": {
        "type": {
          "title": "The type of the precondition evaluation.",
          "description": "Type also defines which properties are required.",
          "type": "string",
          "enum": ["REGEX_MATCH"]
        },
        "property": {
          "title": "Property on the same hierarchy level the precondition is evaluating.",
          "description": "For `type` in [`NULL`, `EQUALS`, `IN`, `REGEX_MATCH`].",
          "type": "string"
        },
        "pattern": {
          "title": "Regex to check against the referred property.",
          "description": "For `type` = `REGEX_MATCH`, type of value should be string.",
          "type": "string",
          "format": "regex"
        }
      },
      "required": ["type", "property", "pattern"],
      "additionalProperties": false
    },
    "Item": {
      "type": "object",
      "properties": {
        "displayName": {
          "description": "The human-friendly name of the list/set item.",
          "type": "string"
        },
        "description": {
          "title": "The human-friendly description of the list/set item.",
          "description": "Short description of what this list/set item is used for.",
          "type": "string"
        },
        "documentation": {
          "title": "Additional documentation of the list/set item.",
          "description": "Additional information about the list/set item, explanation of semantics of its values.",
          "type": "string"
        },
        "type": {
          "title": "Datatype of the property.",
          "description": "Ref-pointer to ComplexType/EnumType id or enum boolean,integer,float,local_date,local_time,local_date_time,zoned_date_time,time_zone,text,secret,setting",
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "boolean",
                "integer",
                "float",
                "local_date",
                "local_time",
                "local_date_time",
                "zoned_date_time",
                "time_zone",
                "text",
                "secret",
                "setting"
              ]
            },
            {
              "$ref": "#/$defs/RefPointer"
            }
          ]
        },
        "subType": {
          "title": "Informal restriction of the datatype.",
          "description": "Only in combination with built-in and enum types.",
          "type": "string"
        },
        "datasource": {
          "title": "The custom data source configuration for these items.",
          "description": "Only in combination with `datasource` subType",
          "$ref": "#/$defs/Datasource"
        },
        "referencedType": {
          "title": "What is referenced in case the value should be interpreted as a reference.",
          "description": "Mandatory for `setting` type, otherwise only optionally used in conjunction with subType.",
          "type": "string"
        },
        "constraints": {
          "description": "Validation constraints the list/set item value must fulfill to be persistable.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Constraint"
          }
        },
        "metadata": {
          "title": "The meta data of the items.",
          "description": "The element can contain an arbitrary number of well-known properties.",
          "$ref": "#/$defs/MetaData"
        },
        "uiCustomization": {
          "title": "UI customization for the items.",
          "description": "This makes it possible to customize how the UI renders values, depending on the type of value different customization options are available.",
          "$ref": "#/$defs/UiCustomization"
        }
      },
      "required": ["type"],
      "allOf": [
        {
          "if": {
            "required": ["subType"],
            "properties": {
              "subType": {
                "const": "datasource"
              }
            }
          },
          "then": {
            "required": ["datasource"],
            "properties": {
              "type": {
                "enum": ["text", "integer"]
              }
            }
          },
          "else": {
            "not": {
              "required": ["datasource"]
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "enum": ["setting"]
              }
            }
          },
          "then": {
            "properties": {
              "referencedType": {
                "pattern": "^[-a-z0-9.:]*$"
              }
            },
            "required": ["referencedType"]
          }
        },
        {
          "if": {
            "not": {
              "properties": {
                "type": {
                  "type": "object",
                  "patternProperties": {
                    "\\$ref": {
                      "pattern": "^.*/types/.*$"
                    }
                  }
                }
              }
            },
            "required": ["uiCustomization"]
          },
          "then": {
            "properties": {
              "uiCustomization": {
                "not": {
                  "required": ["expandable", "tabs"]
                }
              }
            }
          }
        },
        {
          "properties": {
            "uiCustomization": {
              "not": {
                "required": ["callback"]
              }
            }
          }
        }
      ],
      "additionalProperties": false
    },
    "Property": {
      "type": "object",
      "properties": {
        "displayName": {
          "title": "The human-friendly name of the property.",
          "description": "Defaults to `id` in the code-api.",
          "type": "string"
        },
        "description": {
          "title": "The human-friendly description of the property.",
          "description": "Short description of what this property is used for.",
          "type": "string",
          "default": ""
        },
        "documentation": {
          "title": "Additional documentation of the property.",
          "description": "Additional information about the property, explanation of semantics of its values.",
          "type": "string",
          "default": ""
        },
        "metadata": {
          "title": "The meta data of the property.",
          "description": "The element can contain an arbitrary number of well-known properties.",
          "$ref": "#/$defs/MetaData"
        },
        "uiCustomization": {
          "title": "UI customization for the items.",
          "description": "This makes it possible to customize how the UI renders values, depending on the type of value different customization options are available.",
          "$ref": "#/$defs/UiCustomization"
        },
        "type": {
          "title": "Datatype of the property.",
          "description": "Ref-pointer to ComplexType/EnumType id or enum list,set,boolean,integer,float,local_date,local_time,local_date_time,zoned_date_time,time_zone,text,secret,setting.",
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "boolean",
                "integer",
                "float",
                "local_date",
                "local_time",
                "local_date_time",
                "zoned_date_time",
                "time_zone",
                "text",
                "secret",
                "setting",
                "list",
                "set"
              ]
            },
            {
              "$ref": "#/$defs/RefPointer"
            }
          ]
        },
        "subType": {
          "title": "Informal restriction of the datatype.",
          "description": "Only in combination with built-in types.",
          "type": "string"
        },
        "datasource": {
          "title": "The custom datasource configuration for this property.",
          "description": "Only in combination with `datasource` subType.",
          "$ref": "#/$defs/Datasource"
        },
        "referencedType": {
          "title": "What is referenced in case the value should be interpreted as a reference.",
          "description": "Mandatory for `setting` type, otherwise only optionally used in conjunction with subType.",
          "type": "string"
        },
        "items": {
          "title": "Specification for individual items of a list/set type.",
          "description": "Mandatory when `type` in [list,set].",
          "$ref": "#/$defs/Item"
        },
        "nullable": {
          "title": "Defines if value can be null/omitted.",
          "description": "Defaults to `false`. Can't be `true` for properties with type `list` and `set`.",
          "type": "boolean",
          "default": false
        },
        "default": {
          "title": "Value to be used for factory default results.",
          "description": "Mandatory if `nullable` = `false`. Can't be empty for enum properties.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer",
              "format": "int64",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "number",
              "format": "double",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "boolean"
            },
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "string",
              "format": "time"
            },
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "object"
            },
            {
              "type": "array"
            }
          ]
        },
        "minObjects": {
          "title": "The minimum required size for a collection-property.",
          "description": "Optional.",
          "type": "integer",
          "format": "int32",
          "minimum": 0
        },
        "maxObjects": {
          "title": "The maximum allowed size for a collection-property.",
          "description": "Defaults to `100` for collections and `1` for non-collections.",
          "type": "integer",
          "format": "int32",
          "minimum": 1,
          "maximum": 100,
          "default": 1
        },
        "constraints": {
          "description": "Validation constraints the property value must fulfill to be persistable.",
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/Constraint"
              },
              {
                "$ref": "#/$defs/CollectionConstraint"
              }
            ]
          }
        },
        "precondition": {
          "description": "Condition the value of another property must fulfill for this property to be relevant.",
          "$ref": "#/$defs/Precondition"
        },
        "modificationPolicy": {
          "title": "Defines the modifiability of the property value.",
          "description": "`DEFAULT` - modifiability of the value is defined by ModificationFlags.isModifiable, `ALWAYS`/`NEVER` - the value can be always/never modified. Defaults to `DEFAULT`. Cannot be used on properties inside a collection property.",
          "type": "string",
          "enum": ["DEFAULT", "ALWAYS", "NEVER"],
          "default": "DEFAULT"
        },
        "forceSecretResubmission": {
          "title": "Defines if value is allowed to be modified when secret properties are not",
          "description": "If `true` any change to the property value also requires all properties of type `secret` to be provided",
          "type": "boolean",
          "default": false
        },
        "migrationPattern": {
          "title": "Pattern with references to properties to create a new value.",
          "type": "string"
        }
      },
      "required": ["type", "displayName"],
      "allOf": [
        {
          "if": {
            "required": ["subType"],
            "properties": {
              "subType": {
                "const": "datasource"
              }
            }
          },
          "then": {
            "required": ["datasource"],
            "anyOf": [
              {
                "properties": {
                  "type": {
                    "enum": ["text", "integer"]
                  }
                }
              },
              {
                "allOf": [
                  {
                    "properties": {
                      "type": {
                        "$ref": "#/$defs/RefPointer"
                      }
                    }
                  },
                  {
                    "properties": {
                      "type": {
                        "type": "object",
                        "patternProperties": {
                          "\\$ref": {
                            "pattern": "^.*/enums/.*$"
                          }
                        }
                      }
                    }
                  }
                ]
              }
            ]
          },
          "else": {
            "not": {
              "required": ["datasource"]
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "enum": ["setting"]
              }
            }
          },
          "then": {
            "properties": {
              "referencedType": {
                "pattern": "^[-a-z0-9.:]*$"
              }
            },
            "required": ["referencedType"]
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "enum": ["list", "set"]
              }
            },
            "required": ["nullable"]
          },
          "then": {
            "properties": {
              "nullable": {
                "const": false
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "enum": ["list", "set"]
              }
            }
          },
          "then": {
            "required": ["items"]
          },
          "else": {
            "properties": {
              "maxObjects": {
                "const": 1
              }
            },
            "if": {
              "allOf": [
                {
                  "properties": {
                    "nullable": {
                      "not": {
                        "const": true
                      }
                    }
                  }
                },
                {
                  "properties": {
                    "type": {
                      "not": {
                        "type": "object",
                        "patternProperties": {
                          "\\$ref": {
                            "pattern": "^.*/types/.*$"
                          }
                        }
                      }
                    }
                  }
                }
              ]
            },
            "then": {
              "required": ["default"]
            }
          }
        },
        {
          "if": {
            "allOf": [
              {
                "properties": {
                  "type": {
                    "enum": ["list", "set"]
                  }
                }
              },
              {
                "properties": {
                  "items": {
                    "properties": {
                      "type": {
                        "not": {
                          "type": "object",
                          "patternProperties": {
                            "\\$ref": {
                              "pattern": "^.*/types/.*$"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            ]
          },
          "then": {
            "if": {
              "required": ["uiCustomization"]
            },
            "then": {
              "properties": {
                "uiCustomization": {
                  "properties": {
                    "expandable": {
                      "required": ["displayName"]
                    }
                  },
                  "not": {
                    "required": ["tabs"]
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "not": {
                  "type": "object",
                  "patternProperties": {
                    "\\$ref": {
                      "pattern": "^.*/types/.*$"
                    }
                  }
                }
              }
            }
          },
          "then": {
            "if": {
              "properties": {
                "type": {
                  "not": {
                    "enum": ["list", "set"]
                  }
                }
              },
              "required": ["uiCustomization"]
            },
            "then": {
              "properties": {
                "uiCustomization": {
                  "not": {
                    "required": ["expandable", "tabs"]
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "type": "object",
                "patternProperties": {
                  "\\$ref": {
                    "pattern": "^.*/enums/.*$"
                  }
                }
              }
            }
          },
          "then": {
            "patternProperties": {
              "default": {
                "type": "string",
                "pattern": "^.+$"
              }
            }
          }
        },
        {
          "properties": {
            "uiCustomization": {
              "not": {
                "required": ["callback"]
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "enum": [
                  "text",
                  "secret",
                  "time_zone",
                  "setting",
                  "local_date",
                  "local-time",
                  "local_date_time",
                  "zoned_date_time"
                ]
              }
            },
            "required": ["default"]
          },
          "then": {
            "properties": {
              "default": {
                "type": "string"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "enum": ["integer", "float"]
              }
            },
            "required": ["default"]
          },
          "then": {
            "properties": {
              "default": {
                "type": "number"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "boolean"
              }
            },
            "required": ["default"]
          },
          "then": {
            "properties": {
              "default": {
                "type": "boolean"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "enum": ["list", "set"]
              }
            },
            "required": ["default"]
          },
          "then": {
            "allOf": [
              {
                "properties": {
                  "default": {
                    "type": "array"
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "items": {
                      "properties": {
                        "type": {
                          "enum": [
                            "text",
                            "secret",
                            "time_zone",
                            "setting",
                            "local_date",
                            "local-time",
                            "local_date_time",
                            "zoned_date_time"
                          ]
                        }
                      }
                    }
                  }
                },
                "then": {
                  "properties": {
                    "default": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "items": {
                      "properties": {
                        "type": {
                          "enum": ["integer", "float"]
                        }
                      }
                    }
                  }
                },
                "then": {
                  "properties": {
                    "default": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "items": {
                      "properties": {
                        "type": {
                          "const": "boolean"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "properties": {
                    "default": {
                      "type": "array",
                      "items": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "items": {
                      "properties": {
                        "type": {
                          "type": "object",
                          "patternProperties": {
                            "\\$ref": {
                              "pattern": "^.*/types/.*$"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "properties": {
                    "default": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            ]
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "type": "object",
                "patternProperties": {
                  "\\$ref": {
                    "pattern": "^.*/types/.*$"
                  }
                }
              }
            },
            "required": ["default"]
          },
          "then": {
            "properties": {
              "default": {
                "type": "object"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "enum": ["list", "set", "secret"]
              }
            }
          },
          "then": {
            "not": {
              "required": ["forceSecretResubmission"]
            }
          }
        },
        {
          "not": {
            "required": ["migrationPattern"]
          }
        }
      ],
      "additionalProperties": false
    },
    "ComplexType": {
      "type": "object",
      "properties": {
        "type": {
          "title": "The type of the referable object.",
          "description": "Always has to be `object` for complex types.",
          "type": "string",
          "enum": ["object"],
          "default": "object"
        },
        "version": {
          "title": "The version of this type.",
          "description": "Semantic version `x.y.z`, defaults to `0`, has to be increased when properties are added/removed or structurally modified (type, nullable).",
          "type": "string",
          "minLength": 1,
          "pattern": "^\\d+(\\.\\d+)*$",
          "default": "0"
        },
        "versionInfo": {
          "title": "Information about the version of this type.",
          "description": "Defaults to empty string.",
          "type": "string",
          "default": ""
        },
        "displayName": {
          "title": "The human-friendly name of the type.",
          "description": "Defaults to `id` in the code-api.",
          "type": "string"
        },
        "description": {
          "title": "The human-friendly description of the type.",
          "description": "Short description of what this type is used for.",
          "type": "string",
          "default": ""
        },
        "documentation": {
          "title": "Additional documentation of the type.",
          "description": "Additional information about the type, explanation of semantics of its values.",
          "type": "string"
        },
        "summaryPattern": {
          "title": "Pattern with references to properties to create a markdown summary for the value.",
          "description": "Defaults to empty string. Markdown symbols need to be escaped if they are to be displayed normally.",
          "type": "string",
          "default": ""
        },
        "searchPattern": {
          "title": "Pattern with references to properties to create a searchable string for the value.",
          "description": "If not specified the summaryPattern is used for search.",
          "type": "string"
        },
        "properties": {
          "title": "The properties this type is constructed of.",
          "description": "Order is relevant for UI, not for serialization.",
          "type": "object",
          "minProperties": 1,
          "additionalProperties": {
            "$ref": "#/$defs/Property"
          }
        },
        "constraints": {
          "description": "Container validation constraints the type values must fulfill to be persistable.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/ContainerConstraint"
          }
        }
      },
      "required": ["type", "properties"],
      "additionalProperties": false
    },
    "Datasource": {
      "type": "object",
      "properties": {
        "identifier": {
          "title": "The identifier of the custom data source of the property's value.",
          "type": "string"
        },
        "filterProperties": {
          "title": "The properties to filter the datasource options on.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "resetValue": {
          "title": "When to reset datasource value in the UI on filter change.",
          "description": "Hint to the UI to reset value when one of the filter properties changed",
          "type": "string",
          "enum": ["ALWAYS", "NEVER", "INVALID_ONLY"],
          "default": "NEVER"
        },
        "validate": {
          "title": "Whether to validate input to only allow values returned by the datasource.",
          "type": "boolean",
          "default": true
        },
        "fullContext": {
          "title": "Whether this datasource expects full setting payload as the context.",
          "type": "boolean",
          "default": false
        },
        "useApiSearch": {
          "title": "If true, the datasource should use the api to filter the results instead of client-side filtering.",
          "description": "This should be used for datasources that have scaling amounts of options, or exceptionally many.",
          "type": "boolean",
          "default": false
        }
      },
      "required": ["identifier"],
      "if": {
        "required": ["filterProperties"],
        "properties": {
          "filterProperties": {
            "contains": {
              "pattern": "(^.*\\.\\./.*$)|(^#/.*$)"
            }
          }
        }
      },
      "then": {
        "required": ["fullContext"],
        "properties": {
          "fullContext": {
            "const": true
          }
        }
      },
      "additionalProperties": false
    },
    "SchemaConstraint": {
      "type": "object",
      "anyOf": [
        {
          "$ref": "#/$defs/UniqueSchemaPropertiesConstraint"
        },
        {
          "$ref": "#/$defs/UniqueMultiScopeSchemaPropertiesConstraint"
        },
        {
          "$ref": "#/$defs/CustomSchemaValidatorReferenceConstraint"
        },
        {
          "$ref": "#/$defs/ByteSizeLimitConstraint"
        }
      ]
    },
    "BaseSchemaConstraint": {
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        }
      }
    },
    "UniqueSchemaPropertiesConstraint": {
      "required": ["type", "uniqueProperties"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["UNIQUE"]
        },
        "uniqueProperties": {
          "title": "The list of properties for which the combination of values in the schema needs to be unique.",
          "description": "For `type` = `UNIQUE`",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "flattenCollections": {
          "title": "Whether to flatten collection properties when checking for uniqueness, so only disjoint collections are considered unique.",
          "description": "For `type` = `UNIQUE`",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },
    "UniqueMultiScopeSchemaPropertiesConstraint": {
      "required": ["type", "uniqueProperties"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["MULTI_SCOPE_UNIQUE"]
        },
        "uniqueProperties": {
          "title": "The list of properties for which the combination of values in the schema needs to be unique.",
          "description": "For `type` = `MULTI_SCOPE_UNIQUE`",
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "ByteSizeLimitConstraint": {
      "required": ["type", "byteLimit"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["BYTE_SIZE_LIMIT"]
        },
        "byteLimit": {
          "title": "The maximum allowed size in bytes for the sum over all persisted values for the schema.",
          "description": "For `type` = `BYTE_SIZE_LIMIT`",
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "maximum": 2147483647
        }
      },
      "additionalProperties": false
    },
    "CustomSchemaValidatorReferenceConstraint": {
      "required": ["type", "customValidatorId"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["CUSTOM_VALIDATOR_REF", "MULTI_SCOPE_CUSTOM_VALIDATOR_REF"]
        },
        "customValidatorId": {
          "title": "The ID of a custom validator.",
          "description": "For `type` = `CUSTOM_VALIDATOR_REF` or `MULTI_SCOPE_CUSTOM_VALIDATOR_REF`.",
          "type": "string"
        },
        "skipAsyncValidation": {
          "title": "Whether to skip validation on schema change in the UI",
          "description": "`false` - validate on every change in the UI, `true` - validate only on save",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },
    "CustomDeletionValidatorReferenceConstraint": {
      "required": ["customValidatorId"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "customValidatorId": {
          "title": "The ID of a custom validator.",
          "description": "For `type` = `CUSTOM_VALIDATOR_REF`",
          "type": "string"
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["CUSTOM_VALIDATOR_REF"]
        }
      },
      "additionalProperties": false
    },
    "ReferentialIntegrityDeletionConstraint": {
      "required": ["type", "schemaIds"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "schemaIds": {
          "title": "The IDs of schemas that should be checked for references to this schema.",
          "description": "For `type` = `REFERENTIAL_INTEGRITY`",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[-a-z0-9.:]*$"
          },
          "minItems": 1
        },
        "type": {
          "title": "The type of the validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["REFERENTIAL_INTEGRITY"]
        }
      },
      "additionalProperties": false
    },
    "TableColumn": {
      "type": "object",
      "properties": {
        "pattern": {
          "title": "Pattern with references to properties to create a single value for the column.",
          "description": "Same syntax as summaryPattern",
          "type": "string"
        }
      },
      "required": ["pattern"],
      "additionalProperties": false
    },
    "SecretResubmissionContainerConstraint": {
      "required": ["type", "checkAllProperties"],
      "type": "object",
      "properties": {
        "customMessage": {
          "description": "Message to be displayed if constraint is violated.",
          "type": "string"
        },
        "type": {
          "title": "The type of the container validation constraint.",
          "description": "Type also defines which properties are available.",
          "type": "string",
          "enum": ["SECRET_RESUBMISSION"]
        },
        "checkAllProperties": {
          "title": "Consider all properties for secret resubmission.",
          "description": "Either all properties or only those marked with `forceSecretResubmission` are considered.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "DatasourceValidation": {
      "allOf": [
        {
          "properties": {
            "subType": {
              "not": {
                "const": "datasource"
              }
            },
            "items": {
              "properties": {
                "subType": {
                  "not": {
                    "const": "datasource"
                  }
                }
              }
            }
          }
        }
      ]
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "multiObject": {
            "const": false
          }
        }
      },
      "then": {
        "properties": {
          "maxObjects": {
            "const": 1
          },
          "summaryPattern": {
            "pattern": "^$"
          }
        },
        "not": {
          "required": ["searchPattern"]
        },
        "if": {
          "required": ["uiCustomization"]
        },
        "then": {
          "properties": {
            "uiCustomization": {
              "properties": {
                "expandable": {
                  "required": ["sections"]
                }
              }
            }
          }
        }
      },
      "else": {
        "properties": {
          "summaryPattern": {
            "pattern": "^(?!\\s*$).+"
          },
          "searchPattern": {
            "pattern": "^(?!\\s*$).+"
          },
          "maxObjects": {
            "minimum": 1
          }
        },
        "required": ["summaryPattern", "ordered"],
        "allOf": [
          {
            "if": {
              "required": ["uiCustomization"]
            },
            "then": {
              "properties": {
                "uiCustomization": {
                  "properties": {
                    "expandable": {
                      "required": ["displayName"]
                    }
                  }
                }
              }
            }
          }
        ]
      }
    },
    {
      "if": {
        "properties": {
          "schemaId": {
            "pattern": "^(builtin:.+)$"
          }
        }
      },
      "then": {
        "properties": {
          "description": {
            "minLength": 1,
            "pattern": "^(?!\\s*$).+"
          }
        }
      }
    },
    {
      "properties": {
        "types": {
          "additionalProperties": {
            "properties": {
              "properties": {
                "additionalProperties": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/DatasourceValidation"
                    }
                  ]
                }
              }
            }
          }
        },
        "properties": {
          "additionalProperties": {
            "allOf": [
              {
                "$ref": "#/$defs/DatasourceValidation"
              }
            ]
          }
        },
        "constraints": {
          "items": {
            "not": {
              "required": ["timeout"]
            }
          }
        },
        "deletionConstraints": {
          "items": {
            "not": {
              "required": ["timeout"]
            }
          }
        }
      }
    },
    {
      "not": {
        "required": ["deletionConstraints"]
      }
    },
    {
      "not": {
        "required": ["additionalProperties"]
      }
    },
    {
      "if": {
        "required": ["ownerBasedAccessControl"],
        "properties": {
          "ownerBasedAccessControl": {
            "const": true
          }
        }
      },
      "then": {
        "properties": {
          "multiObject": {
            "const": true
          },
          "ordered": {
            "const": false
          }
        }
      }
    }
  ],
  "additionalProperties": false
}
