{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgAttributeTypeVM",
  "components": {
    "schemas": {
      "PkgAttributeTypeVM": {
        "required": [
          "key",
          "name"
        ],
        "type": "object",
        "properties": {
          "acceptableCodetableValues": {
            "type": "string",
            "nullable": true
          },
          "defaultValue": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "features": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "is_translatable",
                        "is_mandatory",
                        "is_html",
                        "is_space_inheritable",
                        "is_token_keyword",
                        "is_token_text",
                        "is_not_presented_in_changes",
                        "is_number",
                        "is_checkbox",
                        "is_date",
                        "has_multiple_values",
                        "has_no_results_label",
                        "is_multiline",
                        "is_static_select",
                        "is_sql_raw",
                        "is_not_presented_in_changes_but_send_to_fe",
                        "is_search_type_term",
                        "is_search_type_text",
                        "is_search_type_number_10",
                        "is_search_type_number_100",
                        "is_search_type_number_1_000",
                        "is_search_type_number_10_000",
                        "is_search_type_number_100_000",
                        "is_search_type_number_1_000_000",
                        "is_search_type_bool",
                        "is_search_type_date",
                        "sort_by_number",
                        "is_url_link",
                        "clear_new_line",
                        "is_datetime",
                        "is_time",
                        "force_comment",
                        "is_parent_inheritable",
                        "is_dependency_change",
                        "is_attribute_type_domain_analysis",
                        "is_search_default_result_text",
                        "is_yes_no",
                        "is_yes_no_icon",
                        "is_attribute_type_fullness",
                        "is_jira_field",
                        "is_attribute_type_diagram_description",
                        "is_primary_key_attribute",
                        "is_data_type_attribute",
                        "is_nullability_attribute",
                        "is_core_diagram_attribute_primary_key",
                        "is_core_diagram_attribute_foreign_key",
                        "is_core_diagram_attribute_data_type",
                        "is_core_diagram_attribute_nullability",
                        "is_core_diagram_attribute_stereotype",
                        "can_be_shown_in_diagram",
                        "include_in_ai_summary",
                        "disable_excel_template_export",
                        "is_core_diagram_attribute_knowledge_weight",
                        "is_primary_definition",
                        "disable_excel_object_export",
                        "is_markdown",
                        "is_attribute_sensitive_document",
                        "is_list",
                        "is_attribute_type_space_short_description",
                        "is_attribute_type_codelist_table",
                        "is_attribute_type_stereotype",
                        "is_attribute_type_is_public",
                        "is_attribute_type_concept_note",
                        "is_attribute_type_order_number",
                        "is_attribute_type_data_type",
                        "is_attribute_type_filter_field_name",
                        "is_attribute_type_key_column",
                        "is_attribute_type_description_column_en",
                        "is_attribute_type_description_column_cs",
                        "is_attribute_type_description_column_fr",
                        "is_attribute_type_value_column",
                        "is_attribute_type_diagram_data",
                        "is_attribute_type_process_codelist",
                        "is_attribute_type_name",
                        "is_ai_generated_summary",
                        "is_ai_generated_summary_toggle_value",
                        "is_attribute_type_diagram_recalculation_flag",
                        "is_attribute_type_recommended",
                        "is_domain_definition",
                        "is_core_diagram_data_type_icon",
                        "is_attribute_type_concept_approval_decision_note",
                        "is_attribute_type_concept_name",
                        "is_domain_alternative_names",
                        "is_numbering_toggle",
                        "is_attribute_type_data_product_id",
                        "is_attribute_type_data_product_description",
                        "is_attribute_type_data_product_value_proposition",
                        "is_attribute_type_sensitivity",
                        "is_attribute_type_data_product_visibility",
                        "is_attribute_type_data_product_product_type"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "boolean",
                      "nullable": true
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "ai_automatic_generated_by",
                        "with_export_control_group"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "fullness_score_value"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "number",
                      "format": "double",
                      "nullable": true
                    }
                  }
                }
              ]
            },
            "nullable": true
          },
          "htmlTemplate": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgNotificationAttributeTypeVM"
            },
            "nullable": true
          },
          "placeholder": {
            "type": "string",
            "nullable": true
          },
          "search": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgSearchVM"
            },
            "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
      },
      "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
      },
      "PkgNotificationAttributeTypeVM": {
        "required": [
          "notificationTemplateKey",
          "recipientUserRelationTypeKey"
        ],
        "type": "object",
        "properties": {
          "applicationKey": {
            "type": "string",
            "nullable": true
          },
          "notificationTemplateKey": {
            "minLength": 1,
            "type": "string"
          },
          "objectTypeKey": {
            "type": "string",
            "nullable": true
          },
          "recipientUserRelationTypeKey": {
            "minLength": 1,
            "type": "string"
          },
          "spacePath": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}