{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgDomainTypeVM",
  "components": {
    "schemas": {
      "PkgDomainTypeVM": {
        "required": [
          "key",
          "name"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "iconKey": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "searchTemplate": {
            "$ref": "#/components/schemas/PkgSearchTemplateVM"
          },
          "sortOrder": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "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
      },
      "PkgSearchTemplateVM": {
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgSearchTemplateFacetedVM"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgSearchTemplateFacetedVM": {
        "required": [
          "enumKey",
          "enumKeyType"
        ],
        "type": "object",
        "properties": {
          "boostFieldName": {
            "type": "string",
            "nullable": true
          },
          "boostValue": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "bucketCountLimit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "defaultCollapsed": {
            "type": "boolean",
            "nullable": true
          },
          "elementType": {
            "enum": [
              "valueList",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "enumKey": {
            "minLength": 1,
            "type": "string"
          },
          "enumKeyType": {
            "minLength": 1,
            "enum": [
              "application",
              "objectType",
              "space",
              "attribute",
              "relation",
              "userRelation",
              "codelist",
              "modelChanges",
              "script",
              "mr_data",
              "workflowState",
              "creator",
              "addRelation",
              "domainTypes",
              "userAttribute"
            ],
            "type": "string"
          },
          "iconId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "iconKey": {
            "type": "string",
            "nullable": true
          },
          "orderBucketsReverse": {
            "type": "boolean",
            "nullable": true
          },
          "orderBucketsType": {
            "type": "string",
            "nullable": true
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgSearchTemplateFacetedParameterVM"
            },
            "nullable": true
          },
          "primaryResultText": {
            "type": "boolean",
            "nullable": true
          },
          "showSelectAllValuesCheckBox": {
            "type": "boolean",
            "nullable": true
          },
          "subFacets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgSearchTemplateFacetedBaseVM"
            },
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "valueType": {
            "enum": [
              "none",
              "isText",
              "isTranslationKey",
              "isBoolean",
              "isNumber",
              "isDate",
              "isDateTime"
            ],
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgSearchTemplateFacetedBaseVM": {
        "required": [
          "enumKey",
          "enumKeyType"
        ],
        "type": "object",
        "properties": {
          "boostFieldName": {
            "type": "string",
            "nullable": true
          },
          "boostValue": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "bucketCountLimit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "defaultCollapsed": {
            "type": "boolean",
            "nullable": true
          },
          "elementType": {
            "enum": [
              "valueList",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "enumKey": {
            "minLength": 1,
            "type": "string"
          },
          "enumKeyType": {
            "minLength": 1,
            "enum": [
              "application",
              "objectType",
              "space",
              "attribute",
              "relation",
              "userRelation",
              "codelist",
              "modelChanges",
              "script",
              "mr_data",
              "workflowState",
              "creator",
              "addRelation",
              "domainTypes",
              "userAttribute"
            ],
            "type": "string"
          },
          "iconId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "iconKey": {
            "type": "string",
            "nullable": true
          },
          "orderBucketsReverse": {
            "type": "boolean",
            "nullable": true
          },
          "orderBucketsType": {
            "type": "string",
            "nullable": true
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgSearchTemplateFacetedParameterVM"
            },
            "nullable": true
          },
          "primaryResultText": {
            "type": "boolean",
            "nullable": true
          },
          "showSelectAllValuesCheckBox": {
            "type": "boolean",
            "nullable": true
          },
          "subFacets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgSearchTemplateFacetedBaseVM"
            },
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "valueType": {
            "enum": [
              "none",
              "isText",
              "isTranslationKey",
              "isBoolean",
              "isNumber",
              "isDate",
              "isDateTime"
            ],
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgSearchTemplateFacetedParameterVM": {
        "required": [
          "enumKey",
          "enumKeyType"
        ],
        "type": "object",
        "properties": {
          "enumKey": {
            "minLength": 1,
            "type": "string"
          },
          "enumKeyType": {
            "minLength": 1,
            "enum": [
              "application",
              "objectType",
              "space",
              "attribute",
              "relation",
              "userRelation",
              "codelist",
              "modelChanges",
              "script",
              "mr_data",
              "workflowState",
              "creator",
              "addRelation",
              "domainTypes",
              "userAttribute"
            ],
            "type": "string"
          },
          "valueType": {
            "enum": [
              "none",
              "isText",
              "isTranslationKey",
              "isBoolean",
              "isNumber",
              "isDate",
              "isDateTime"
            ],
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}