{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgHierarchyDefinitionVM",
  "components": {
    "schemas": {
      "PkgHierarchyDefinitionVM": {
        "required": [
          "key",
          "name",
          "type"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "disableParentUpdate": {
            "type": "boolean",
            "nullable": true
          },
          "hasSameLevelParent": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgHierarchyDefinitionLevelVM"
            },
            "nullable": true
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgEntityTranslationVM"
            },
            "nullable": true
          },
          "type": {
            "minLength": 1,
            "type": "string"
          }
        },
        "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
      },
      "PkgHierarchyDefinitionLevelVM": {
        "required": [
          "key",
          "name",
          "type"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "hasFixedParent": {
            "type": "boolean",
            "nullable": true
          },
          "hideIfEmpty": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "objectTypeKey": {
            "type": "string",
            "nullable": true
          },
          "parentLevelKey": {
            "type": "string",
            "nullable": true
          },
          "template": {
            "$ref": "#/components/schemas/MainDatabaseTemplate"
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgEntityTranslationVM"
            },
            "nullable": true
          },
          "type": {
            "maxLength": 3,
            "minLength": 1,
            "enum": [
              "OBJ",
              "FLD"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}