{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-purview/json-schema/microsoft-purview-term-template-def-schema.json",
  "title": "TermTemplateDef",
  "description": "Term template definition for glossary term.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-purview-types-api-openapi.yml#/components/schemas/TermTemplateDef",
  "type": "object",
  "properties": {
    "category": {
      "$ref": "#/$defs/TypeCategory",
      "description": "The enum of type category."
    },
    "createTime": {
      "type": "integer",
      "format": "int64",
      "description": "The created time of the record."
    },
    "createdBy": {
      "type": "string",
      "description": "The user who created the record."
    },
    "dateFormatter": {
      "$ref": "#/$defs/DateFormat",
      "description": "The date format."
    },
    "description": {
      "type": "string",
      "description": "The description of the type definition."
    },
    "guid": {
      "type": "string",
      "description": "The GUID of the type definition."
    },
    "name": {
      "type": "string",
      "description": "The name of the type definition."
    },
    "options": {
      "type": "object",
      "description": "The options for the type definition.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "serviceType": {
      "type": "string",
      "description": "The service type."
    },
    "typeVersion": {
      "type": "string",
      "description": "The version of the type."
    },
    "updateTime": {
      "type": "integer",
      "format": "int64",
      "description": "The update time of the record."
    },
    "updatedBy": {
      "type": "string",
      "description": "The user who updated the record."
    },
    "version": {
      "type": "integer",
      "format": "int64",
      "description": "The version of the record."
    },
    "lastModifiedTS": {
      "type": "string",
      "description": "ETag for concurrency control."
    },
    "attributeDefs": {
      "type": "array",
      "description": "An array of attribute definitions.",
      "items": {
        "$ref": "#/$defs/AtlasAttributeDef"
      }
    }
  },
  "$defs": {
    "AtlasAttributeDef": {
      "type": "object",
      "description": "class that captures details of a struct-attribute.",
      "properties": {
        "cardinality": {
          "$ref": "#/$defs/CardinalityValue",
          "description": "single-valued attribute or multi-valued attribute."
        },
        "constraints": {
          "type": "array",
          "description": "An array of constraints.",
          "items": {
            "$ref": "#/$defs/AtlasConstraintDef"
          }
        },
        "defaultValue": {
          "type": "string",
          "description": "The default value of the attribute."
        },
        "description": {
          "type": "string",
          "description": "The description of the attribute."
        },
        "includeInNotification": {
          "type": "boolean",
          "description": "Determines if it is included in notification."
        },
        "isIndexable": {
          "type": "boolean",
          "description": "Determines if it is indexable."
        },
        "isOptional": {
          "type": "boolean",
          "description": "Determines if it is optional."
        },
        "isUnique": {
          "type": "boolean",
          "description": "Determines if it unique."
        },
        "name": {
          "type": "string",
          "description": "The name of the attribute."
        },
        "options": {
          "type": "object",
          "description": "The options for the attribute.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "typeName": {
          "type": "string",
          "description": "The name of the type."
        },
        "valuesMaxCount": {
          "type": "integer",
          "format": "int32",
          "description": "The maximum count of the values."
        },
        "valuesMinCount": {
          "type": "integer",
          "format": "int32",
          "description": "The minimum count of the values."
        }
      }
    },
    "AtlasConstraintDef": {
      "type": "object",
      "description": "class that captures details of a constraint.",
      "properties": {
        "params": {
          "type": "object",
          "description": "The parameters of the constraint definition.",
          "additionalProperties": {}
        },
        "type": {
          "type": "string",
          "description": "The type of the constraint."
        }
      }
    },
    "CardinalityValue": {
      "type": "string",
      "description": "Cardinality",
      "enum": [
        "SINGLE",
        "LIST",
        "SET"
      ],
      "x-ms-enum": {
        "name": "CardinalityValue",
        "modelAsString": true,
        "values": [
          {
            "name": "Single",
            "value": "SINGLE",
            "description": "single"
          },
          {
            "name": "List",
            "value": "LIST",
            "description": "list"
          },
          {
            "name": "Set",
            "value": "SET",
            "description": "set"
          }
        ]
      }
    },
    "DateFormat": {
      "type": "object",
      "description": "The date format.",
      "properties": {
        "availableLocales": {
          "type": "array",
          "description": "An array of available locales.",
          "items": {
            "type": "string"
          }
        },
        "calendar": {
          "type": "number",
          "format": "float",
          "description": "Calendar"
        },
        "dateInstance": {
          "$ref": "#/$defs/DateFormat",
          "description": "The date format."
        },
        "dateTimeInstance": {
          "$ref": "#/$defs/DateFormat",
          "description": "The date format."
        },
        "instance": {
          "$ref": "#/$defs/DateFormat",
          "description": "The date format."
        },
        "lenient": {
          "type": "boolean",
          "description": "Determines the leniency of the date format."
        },
        "numberFormat": {
          "$ref": "#/$defs/NumberFormat",
          "description": "The number format."
        },
        "timeInstance": {
          "$ref": "#/$defs/DateFormat",
          "description": "The date format."
        },
        "timeZone": {
          "$ref": "#/$defs/TimeZone",
          "description": "The timezone information."
        }
      }
    },
    "NumberFormat": {
      "type": "object",
      "description": "The number format.",
      "properties": {
        "availableLocales": {
          "type": "array",
          "description": "The number format.",
          "items": {
            "type": "string"
          }
        },
        "currency": {
          "type": "string",
          "description": "The currency."
        },
        "currencyInstance": {
          "$ref": "#/$defs/NumberFormat",
          "description": "The number format."
        },
        "groupingUsed": {
          "type": "boolean",
          "description": "Determines if grouping is used."
        },
        "instance": {
          "$ref": "#/$defs/NumberFormat",
          "description": "The number format."
        },
        "integerInstance": {
          "$ref": "#/$defs/NumberFormat",
          "description": "The number format."
        },
        "maximumFractionDigits": {
          "type": "integer",
          "format": "int32",
          "description": "The maximum of fraction digits."
        },
        "maximumIntegerDigits": {
          "type": "integer",
          "format": "int32",
          "description": "The maximum of integer digits."
        },
        "minimumFractionDigits": {
          "type": "integer",
          "format": "int32",
          "description": "The minimum of fraction digits."
        },
        "minimumIntegerDigits": {
          "type": "integer",
          "format": "int32",
          "description": "The minimum of integer digits."
        },
        "numberInstance": {
          "$ref": "#/$defs/NumberFormat",
          "description": "The number format."
        },
        "parseIntegerOnly": {
          "type": "boolean",
          "description": "Determines if only integer is parsed."
        },
        "percentInstance": {
          "$ref": "#/$defs/NumberFormat",
          "description": "The number format."
        },
        "roundingMode": {
          "$ref": "#/$defs/RoundingMode",
          "description": "The enum of rounding mode."
        }
      }
    },
    "RoundingMode": {
      "type": "string",
      "description": "Rounding Mode",
      "enum": [
        "UP",
        "DOWN",
        "CEILING",
        "FLOOR",
        "HALF_UP",
        "HALF_DOWN",
        "HALF_EVEN",
        "UNNECESSARY"
      ],
      "x-ms-enum": {
        "name": "RoundingMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Up",
            "value": "UP",
            "description": "up"
          },
          {
            "name": "Down",
            "value": "DOWN",
            "description": "down"
          },
          {
            "name": "Ceiling",
            "value": "CEILING",
            "description": "ceiling"
          },
          {
            "name": "Floor",
            "value": "FLOOR",
            "description": "floor"
          },
          {
            "name": "HalfUp",
            "value": "HALF_UP",
            "description": "half up"
          },
          {
            "name": "HalfDown",
            "value": "HALF_DOWN",
            "description": "half down"
          },
          {
            "name": "HalfEven",
            "value": "HALF_EVEN",
            "description": "half even"
          },
          {
            "name": "Unnecessary",
            "value": "UNNECESSARY",
            "description": "unnecessary"
          }
        ]
      }
    },
    "TimeZone": {
      "type": "object",
      "description": "The timezone information.",
      "properties": {
        "dstSavings": {
          "type": "integer",
          "format": "int32",
          "description": "The value of the daylight saving time."
        },
        "id": {
          "type": "string",
          "description": "The ID of the timezone."
        },
        "availableIds": {
          "type": "array",
          "description": "An array of available IDs.",
          "items": {
            "type": "string"
          }
        },
        "default": {
          "$ref": "#/$defs/TimeZone",
          "description": "The timezone information."
        },
        "displayName": {
          "type": "string",
          "description": "The display name of the timezone."
        },
        "rawOffset": {
          "type": "integer",
          "format": "int32",
          "description": "The raw offset of the timezone."
        }
      }
    },
    "TypeCategory": {
      "type": "string",
      "description": "Type Category",
      "enum": [
        "PRIMITIVE",
        "OBJECT_ID_TYPE",
        "ENUM",
        "STRUCT",
        "CLASSIFICATION",
        "ENTITY",
        "ARRAY",
        "MAP",
        "RELATIONSHIP",
        "TERM_TEMPLATE"
      ],
      "x-ms-enum": {
        "name": "TypeCategory",
        "modelAsString": true,
        "values": [
          {
            "name": "Primitive",
            "value": "PRIMITIVE",
            "description": "primitive"
          },
          {
            "name": "ObjectIdType",
            "value": "OBJECT_ID_TYPE",
            "description": "object id type"
          },
          {
            "name": "Enum",
            "value": "ENUM",
            "description": "enum"
          },
          {
            "name": "Struct",
            "value": "STRUCT",
            "description": "struct"
          },
          {
            "name": "Classification",
            "value": "CLASSIFICATION",
            "description": "classification"
          },
          {
            "name": "Entity",
            "value": "ENTITY",
            "description": "entity"
          },
          {
            "name": "Array",
            "value": "ARRAY",
            "description": "array"
          },
          {
            "name": "Map",
            "value": "MAP",
            "description": "map"
          },
          {
            "name": "Relationship",
            "value": "RELATIONSHIP",
            "description": "relationship"
          },
          {
            "name": "TermTemplate",
            "value": "TERM_TEMPLATE",
            "description": "term template"
          }
        ]
      }
    }
  }
}