{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgDiDataSourceDefinitionVM",
  "components": {
    "schemas": {
      "PkgDiDataSourceDefinitionVM": {
        "required": [
          "key",
          "name",
          "provider"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "provider": {
            "minLength": 1,
            "type": "string"
          },
          "queries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgDiDataSourceQueryVM"
            },
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgEntityTranslationVM"
            },
            "nullable": true
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgDiDataSourceVersionVM"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgDiDataSourceVersionVM": {
        "required": [
          "key",
          "name"
        ],
        "type": "object",
        "properties": {
          "dataFactory": {
            "$ref": "#/components/schemas/PkgDiDataFactoryVM"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "options": {
            "$ref": "#/components/schemas/PkgDiDataSourceVersionBaseOptionsVM"
          },
          "queryDefinitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgDiQueryDefinitionVM"
            },
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "template": {
            "$ref": "#/components/schemas/IngestionTemplate"
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgEntityTranslationVM"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgEntityTranslationVM": {
        "required": [
          "languageKey"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "languageKey": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "shortcut": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IngestionTemplate": {
        "type": "object",
        "properties": {
          "$schema": {
            "type": "string",
            "nullable": true
          },
          "aiGenerationEnabled": {
            "type": "boolean",
            "nullable": true
          },
          "lineageParsingEnabled": {
            "type": "boolean",
            "nullable": true
          },
          "providerName": {
            "type": "string",
            "nullable": true
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Step"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Step": {
        "type": "object",
        "properties": {
          "buttons": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Button"
            },
            "nullable": true
          },
          "centerArea": {
            "$ref": "#/components/schemas/Area"
          }
        },
        "additionalProperties": false
      },
      "Area": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/InputDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/ScheduleDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/SectionDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/SelectDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/TextDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/TitleDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/CheckboxDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/WorkflowSelectDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/SpaceSelectDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/JsonInputDiTemplate"
                }
              ]
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "JsonInputDiTemplate": {
        "required": [
          "encrypted",
          "key",
          "multiLine",
          "onEditDeletePassword",
          "required",
          "type"
        ],
        "type": "object",
        "properties": {
          "encrypted": {
            "type": "boolean"
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "labelKey": {
            "type": "string",
            "nullable": true
          },
          "labelVariant": {
            "enum": [
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "paragraph",
              "body1",
              "body1underline",
              "captionText1",
              "captionText1underline",
              "captionText1caps",
              "captionText2",
              "captionText3"
            ],
            "type": "string",
            "nullable": true
          },
          "multiLine": {
            "type": "integer",
            "format": "int32"
          },
          "onEditDeletePassword": {
            "type": "boolean"
          },
          "placeholderKey": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "tooltipKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "json_input"
            ],
            "type": "string",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "SpaceSelectDiTemplate": {
        "required": [
          "key",
          "onEditDeletePassword",
          "required",
          "type"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "labelKey": {
            "type": "string",
            "nullable": true
          },
          "labelVariant": {
            "enum": [
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "paragraph",
              "body1",
              "body1underline",
              "captionText1",
              "captionText1underline",
              "captionText1caps",
              "captionText2",
              "captionText3"
            ],
            "type": "string",
            "nullable": true
          },
          "onEditDeletePassword": {
            "type": "boolean"
          },
          "placeholderKey": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "tooltipKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "space_select"
            ],
            "type": "string",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "WorkflowSelectDiTemplate": {
        "required": [
          "key",
          "onEditDeletePassword",
          "required",
          "type"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "labelKey": {
            "type": "string",
            "nullable": true
          },
          "labelVariant": {
            "enum": [
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "paragraph",
              "body1",
              "body1underline",
              "captionText1",
              "captionText1underline",
              "captionText1caps",
              "captionText2",
              "captionText3"
            ],
            "type": "string",
            "nullable": true
          },
          "onEditDeletePassword": {
            "type": "boolean"
          },
          "placeholderKey": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "tooltipKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "workflow_select"
            ],
            "type": "string",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "CheckboxDiTemplate": {
        "required": [
          "default",
          "key",
          "onEditDeletePassword",
          "type"
        ],
        "type": "object",
        "properties": {
          "default": {
            "type": "boolean"
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "labelKey": {
            "type": "string",
            "nullable": true
          },
          "labelVariant": {
            "enum": [
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "paragraph",
              "body1",
              "body1underline",
              "captionText1",
              "captionText1underline",
              "captionText1caps",
              "captionText2",
              "captionText3"
            ],
            "type": "string",
            "nullable": true
          },
          "onEditDeletePassword": {
            "type": "boolean"
          },
          "tooltipKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "checkbox"
            ],
            "type": "string",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "TitleDiTemplate": {
        "required": [
          "showAppIcon",
          "type"
        ],
        "type": "object",
        "properties": {
          "showAppIcon": {
            "type": "boolean"
          },
          "subtitleKey": {
            "type": "string",
            "nullable": true
          },
          "titleKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "title"
            ],
            "type": "string",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "TextDiTemplate": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "tooltipKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "text"
            ],
            "type": "string",
            "readOnly": true
          },
          "valueKey": {
            "type": "string",
            "nullable": true
          },
          "variant": {
            "enum": [
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "paragraph",
              "body1",
              "body1underline",
              "captionText1",
              "captionText1underline",
              "captionText1caps",
              "captionText2",
              "captionText3"
            ],
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SelectDiTemplate": {
        "required": [
          "key",
          "multiselect",
          "onEditDeletePassword",
          "required",
          "type"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SelectItem"
            },
            "nullable": true
          },
          "defaultValue": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "labelKey": {
            "type": "string",
            "nullable": true
          },
          "labelVariant": {
            "enum": [
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "paragraph",
              "body1",
              "body1underline",
              "captionText1",
              "captionText1underline",
              "captionText1caps",
              "captionText2",
              "captionText3"
            ],
            "type": "string",
            "nullable": true
          },
          "multiselect": {
            "type": "boolean"
          },
          "onEditDeletePassword": {
            "type": "boolean"
          },
          "placeholderKey": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "tooltipKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "select"
            ],
            "type": "string",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "SelectItem": {
        "type": "object",
        "properties": {
          "labelKey": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SectionDiTemplate": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/InputDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/ScheduleDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/SectionDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/SelectDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/TextDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/TitleDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/CheckboxDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/WorkflowSelectDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/SpaceSelectDiTemplate"
                },
                {
                  "$ref": "#/components/schemas/JsonInputDiTemplate"
                }
              ]
            },
            "nullable": true
          },
          "titleKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "section"
            ],
            "type": "string",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ScheduleDiTemplate": {
        "required": [
          "key",
          "required",
          "type"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "labelKey": {
            "type": "string",
            "nullable": true
          },
          "labelVariant": {
            "enum": [
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "paragraph",
              "body1",
              "body1underline",
              "captionText1",
              "captionText1underline",
              "captionText1caps",
              "captionText2",
              "captionText3"
            ],
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "tooltipKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "schedule"
            ],
            "type": "string",
            "readOnly": true
          },
          "variant": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InputDiTemplate": {
        "required": [
          "encrypted",
          "key",
          "multiLine",
          "onEditDeletePassword",
          "required",
          "type"
        ],
        "type": "object",
        "properties": {
          "encrypted": {
            "type": "boolean"
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "labelKey": {
            "type": "string",
            "nullable": true
          },
          "labelVariant": {
            "enum": [
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "paragraph",
              "body1",
              "body1underline",
              "captionText1",
              "captionText1underline",
              "captionText1caps",
              "captionText2",
              "captionText3"
            ],
            "type": "string",
            "nullable": true
          },
          "multiLine": {
            "type": "integer",
            "format": "int32"
          },
          "onEditDeletePassword": {
            "type": "boolean"
          },
          "placeholderKey": {
            "type": "string",
            "nullable": true
          },
          "required": {
            "type": "boolean"
          },
          "tooltipKey": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "enum": [
              "input"
            ],
            "type": "string",
            "readOnly": true
          },
          "variant": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Button": {
        "type": "object",
        "properties": {
          "labelKey": {
            "type": "string",
            "nullable": true
          },
          "labelVariant": {
            "enum": [
              "h1",
              "h2",
              "h3",
              "h4",
              "h5",
              "paragraph",
              "body1",
              "body1underline",
              "captionText1",
              "captionText1underline",
              "captionText1caps",
              "captionText2",
              "captionText3"
            ],
            "type": "string",
            "nullable": true
          },
          "tooltipKey": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgDiQueryDefinitionVM": {
        "required": [
          "format",
          "order",
          "queryKey"
        ],
        "type": "object",
        "properties": {
          "definition": {
            "type": "string",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldVm"
            },
            "nullable": true
          },
          "format": {
            "minLength": 1,
            "type": "string"
          },
          "isCompressed": {
            "type": "boolean",
            "nullable": true
          },
          "isExecutable": {
            "type": "boolean",
            "nullable": true
          },
          "isOrdered": {
            "type": "boolean",
            "nullable": true
          },
          "options": {
            "$ref": "#/components/schemas/OptionsVm"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "queryKey": {
            "minLength": 1,
            "type": "string"
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OptionsVm": {
        "type": "object",
        "properties": {
          "relationTypeKey": {
            "type": "string",
            "nullable": true
          },
          "scanMasterOnly": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "FieldVm": {
        "type": "object",
        "properties": {
          "isFromKey": {
            "type": "boolean",
            "nullable": true
          },
          "isKey": {
            "type": "boolean",
            "nullable": true
          },
          "isName": {
            "type": "boolean",
            "nullable": true
          },
          "isParentKey": {
            "type": "boolean",
            "nullable": true
          },
          "isRelationTypeKey": {
            "type": "boolean",
            "nullable": true
          },
          "isToKey": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgDiDataSourceVersionBaseOptionsVM": {
        "required": [
          "batchSize",
          "convertBooleanToNumeric",
          "createChangeLogs",
          "createVersions"
        ],
        "type": "object",
        "properties": {
          "batchSize": {
            "type": "integer",
            "format": "int32"
          },
          "convertBooleanToNumeric": {
            "type": "boolean"
          },
          "createChangeLogs": {
            "type": "boolean"
          },
          "createVersions": {
            "type": "boolean"
          },
          "ingestionFormat": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgDiDataFactoryVM": {
        "type": "object",
        "properties": {
          "pipelines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgDiDataFactoryPipelineVM"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgDiDataFactoryPipelineVM": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgDiDataSourceQueryVM": {
        "required": [
          "key",
          "type"
        ],
        "type": "object",
        "properties": {
          "abbreviation": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgEntityTranslationVM"
            },
            "nullable": true
          },
          "type": {
            "minLength": 1,
            "enum": [
              "object",
              "relation",
              "generic"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}