{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgApplicationVM",
  "components": {
    "schemas": {
      "PkgApplicationVM": {
        "required": [
          "colorKey",
          "defaultObjectTypeKey",
          "key",
          "name",
          "shortcut"
        ],
        "type": "object",
        "properties": {
          "colorKey": {
            "minLength": 1,
            "type": "string"
          },
          "dataIntegrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgDiApplicationDataIntegrationVM"
            },
            "nullable": true
          },
          "defaultObjectTypeKey": {
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "exportTemplateKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgExportTemplateVM"
            },
            "nullable": true
          },
          "hierarchyDefinitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgApplicationHierarchyDefinitionVM"
            },
            "nullable": true
          },
          "iconKey": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgNotificationApplicationVM"
            },
            "nullable": true
          },
          "objectTypeKeys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "search": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgSearchVM"
            },
            "nullable": true
          },
          "settings": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "is_application_data_lineage",
                        "is_application_data_dictionary",
                        "is_application_code_tables",
                        "is_application_dawiso_objects",
                        "is_application_pdm_app",
                        "media_gray_background",
                        "no_background_color_app_badge",
                        "is_mip_secured_application",
                        "is_data_product_application",
                        "hide_comment_section",
                        "read_only_hierarchy",
                        "object_not_creatable",
                        "snapshot_enabled",
                        "word_export_enabled",
                        "excel_export_enabled",
                        "pdf_export_enabled",
                        "excel_import_enabled",
                        "versioning_on_sort_order_enabled",
                        "change_analysis_enabled",
                        "disable_change_of_numbering",
                        "disable_sort_objects",
                        "has_token_keywords",
                        "has_token_texts",
                        "check_exact_match",
                        "exact_match_spaces",
                        "disable_duplicate_validation_for_spaceapp",
                        "force_confirmation_after_object_move",
                        "copy_paste_as_plaintext_like",
                        "word_diff_use_highlight",
                        "enable_export_all_versions_between_two_dates",
                        "is_export_control",
                        "object_workflow_space_admin_as_regular_user",
                        "move_object_based_on_role",
                        "export_use_space_app_object_type_check"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "boolean",
                      "nullable": true
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "order_number"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "integer",
                      "nullable": true
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "color",
                        "one_global_font",
                        "object_ladder_numbering_pattern",
                        "changed_text_color",
                        "deleted_text_color"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "lineage_parsing_options"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "$ref": "#/components/schemas/LineageParsingOptions"
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "excel_import_settings"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "$ref": "#/components/schemas/ImportSettingsBase"
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "excel_export_settings"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "$ref": "#/components/schemas/ExportSettingsBase"
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "external_loads"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "$ref": "#/components/schemas/ExternalLoadsSettingsBase"
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "concept_table_template"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "$ref": "#/components/schemas/ConceptTableDatabaseTemplate"
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "token_keyword_spaces",
                        "token_keyword_apps"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "nullable": true
                    }
                  }
                }
              ]
            },
            "nullable": true
          },
          "shortcut": {
            "minLength": 1,
            "type": "string"
          },
          "spaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgSpaceApplicationVM"
            },
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "templates": {
            "$ref": "#/components/schemas/PkgApplicationTemplateVM"
          },
          "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
      },
      "PkgApplicationTemplateVM": {
        "type": "object",
        "properties": {
          "main": {
            "$ref": "#/components/schemas/ApplicationDatabaseTemplate"
          }
        },
        "additionalProperties": false
      },
      "PkgSpaceApplicationVM": {
        "required": [
          "spacePath",
          "workflowKey"
        ],
        "type": "object",
        "properties": {
          "settings": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "hide_comment_section",
                        "read_only_hierarchy",
                        "object_not_creatable",
                        "snapshot_enabled",
                        "word_export_enabled",
                        "excel_export_enabled",
                        "pdf_export_enabled",
                        "excel_import_enabled",
                        "versioning_on_sort_order_enabled",
                        "change_analysis_enabled",
                        "disable_change_of_numbering",
                        "disable_sort_objects",
                        "has_token_keywords",
                        "has_token_texts",
                        "check_exact_match",
                        "exact_match_spaces",
                        "disable_duplicate_validation_for_spaceapp",
                        "force_confirmation_after_object_move",
                        "copy_paste_as_plaintext_like",
                        "word_diff_use_highlight",
                        "enable_export_all_versions_between_two_dates",
                        "is_export_control",
                        "object_workflow_space_admin_as_regular_user",
                        "move_object_based_on_role",
                        "export_use_space_app_object_type_check"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "boolean",
                      "nullable": true
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "order_number"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "integer",
                      "nullable": true
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "object_ladder_numbering_pattern",
                        "changed_text_color",
                        "deleted_text_color"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "excel_import_settings"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "$ref": "#/components/schemas/ImportSettingsBase"
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "excel_export_settings"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "$ref": "#/components/schemas/ExportSettingsBase"
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "external_loads"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "$ref": "#/components/schemas/ExternalLoadsSettingsBase"
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "concept_table_template"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "$ref": "#/components/schemas/ConceptTableDatabaseTemplate"
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "token_keyword_spaces",
                        "token_keyword_apps"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "nullable": true
                    }
                  }
                }
              ]
            },
            "nullable": true
          },
          "spacePath": {
            "minLength": 1,
            "type": "string"
          },
          "workflowKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ExternalLoadsSettingsBase": {
        "required": [
          "enableChangeLogAndVersioning"
        ],
        "type": "object",
        "properties": {
          "enableChangeLogAndVersioning": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ExportSettingsBase": {
        "required": [
          "filterApplicationsEnabled",
          "filterSpacesEnabled",
          "joinNumberingAndObjectName",
          "truncateLongCellValueEnabled"
        ],
        "type": "object",
        "properties": {
          "allowedCodeListTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "allowedHierarchyTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "allowedImportModes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "dateFormat": {
            "type": "string",
            "nullable": true
          },
          "defaultCodeListType": {
            "type": "string",
            "nullable": true
          },
          "defaultHierarchyType": {
            "type": "string",
            "nullable": true
          },
          "defaultImportMode": {
            "type": "string",
            "nullable": true
          },
          "defaultWorkflowState": {
            "type": "string",
            "nullable": true
          },
          "filterApplicationsEnabled": {
            "type": "boolean"
          },
          "filterSpacesEnabled": {
            "type": "boolean"
          },
          "hiddenCodeListSheets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "hiddenObjectSheetColumns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "hiddenRelationsSheetColumns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "joinNumberingAndObjectName": {
            "type": "boolean"
          },
          "truncateLongCellValueEnabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ImportSettingsBase": {
        "type": "object",
        "properties": {
          "allowCrossSpaceAppImport": {
            "type": "boolean",
            "nullable": true
          },
          "allowedImportModes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "dateFormat": {
            "type": "string",
            "nullable": true
          },
          "fullReloadDeletionMode": {
            "type": "string",
            "nullable": true
          },
          "minimalRightsLevel": {
            "type": "string",
            "nullable": true
          },
          "multiAppsImportEnabled": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LineageParsingOptions": {
        "type": "object",
        "properties": {
          "attributeTypeMapping": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttributeTypeMap"
            },
            "nullable": true
          },
          "droppedCapPct": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "fullThreshold": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "incremental": {
            "type": "boolean",
            "nullable": true
          },
          "maxIncrementalDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "minProcedureBodyLen": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "objectTypeMapping": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ObjectTypeMap"
            },
            "nullable": true
          },
          "prescanMacrosDepth": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "qualityAcceptedAcceptThreshold": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "qualityAcceptedRejectThreshold": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "qualityDroppedAcceptThreshold": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "qualityDroppedRejectThreshold": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ObjectTypeMap": {
        "type": "object",
        "properties": {
          "objectType": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AttributeTypeMap": {
        "type": "object",
        "properties": {
          "attributeType": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgSearchVM": {
        "required": [
          "isSearchable"
        ],
        "type": "object",
        "properties": {
          "applicationKey": {
            "type": "string",
            "nullable": true
          },
          "attributeTypeKey": {
            "type": "string",
            "nullable": true
          },
          "boost": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "functionKey": {
            "type": "string",
            "nullable": true
          },
          "indexKey": {
            "type": "string",
            "nullable": true
          },
          "isSearchable": {
            "type": "boolean"
          },
          "objectTypeKey": {
            "type": "string",
            "nullable": true
          },
          "searchAttachments": {
            "type": "boolean",
            "nullable": true
          },
          "spacePath": {
            "type": "string",
            "nullable": true
          },
          "tagKey": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgNotificationApplicationVM": {
        "required": [
          "notificationTemplateKey",
          "recipientUserRelationTypeKey"
        ],
        "type": "object",
        "properties": {
          "attributeTypeKey": {
            "type": "string",
            "nullable": true
          },
          "notificationTemplateKey": {
            "minLength": 1,
            "type": "string"
          },
          "objectTypeKey": {
            "type": "string",
            "nullable": true
          },
          "recipientUserRelationTypeKey": {
            "minLength": 1,
            "type": "string"
          },
          "relationTypeKey": {
            "type": "string",
            "nullable": true
          },
          "spacePath": {
            "type": "string",
            "nullable": true
          },
          "userRelationTypeKey": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgApplicationHierarchyDefinitionVM": {
        "required": [
          "hierarchyDefinitionKey"
        ],
        "type": "object",
        "properties": {
          "childrenCountType": {
            "type": "string",
            "nullable": true
          },
          "hierarchyDefinitionKey": {
            "minLength": 1,
            "type": "string"
          },
          "isDefault": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgExportTemplateVM": {
        "required": [
          "key"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PkgDiApplicationDataIntegrationVM": {
        "required": [
          "dataSourceDefinitionKey",
          "mappings",
          "versionKey"
        ],
        "type": "object",
        "properties": {
          "dataSourceDefinitionKey": {
            "minLength": 1,
            "type": "string"
          },
          "mappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingVM"
            }
          },
          "versionKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "MappingVM": {
        "required": [
          "mapping",
          "objectTypeKey",
          "queryKey"
        ],
        "type": "object",
        "properties": {
          "mapping": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldMappingVM"
            }
          },
          "objectTypeKey": {
            "minLength": 1,
            "type": "string"
          },
          "queryKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "FieldMappingVM": {
        "required": [
          "attributeTypeKey",
          "fieldKey"
        ],
        "type": "object",
        "properties": {
          "attributeTypeKey": {
            "minLength": 1,
            "type": "string"
          },
          "fieldKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}