{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://dta.martinprinz.dev/schemas/token-file.schema.json",
  "type": "object",
  "properties": {
    "$type": {
      "type": "string",
      "enum": [
        "color",
        "dimension",
        "fontFamily",
        "fontWeight",
        "duration",
        "cubicBezier",
        "number",
        "strokeStyle",
        "border",
        "transition",
        "shadow",
        "gradient",
        "typography",
        "string",
        "boolean"
      ],
      "description": "The types of DTCG 2025.10, plus string and boolean (Figma variables). Inherited from the closest group when the token sets none."
    },
    "$description": {
      "type": "string"
    },
    "$deprecated": {
      "description": "true, or the explanation (for example which token to use instead).",
      "type": [
        "boolean",
        "string"
      ]
    },
    "$extensions": {
      "type": "object",
      "properties": {
        "com.figma": {
          "type": "object",
          "properties": {
            "hiddenFromPublishing": {
              "type": "boolean"
            },
            "scopes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "codeSyntax": {
              "type": "object",
              "properties": {
                "WEB": {
                  "type": "string"
                },
                "ANDROID": {
                  "type": "string"
                },
                "iOS": {
                  "type": "string"
                }
              },
              "additionalProperties": {}
            }
          },
          "additionalProperties": {},
          "description": "Figma-specific variable metadata, kept when pushing to Figma."
        }
      },
      "additionalProperties": {}
    }
  },
  "additionalProperties": {
    "anyOf": [
      {
        "type": "object",
        "properties": {
          "$type": {
            "type": "string",
            "enum": [
              "color",
              "dimension",
              "fontFamily",
              "fontWeight",
              "duration",
              "cubicBezier",
              "number",
              "strokeStyle",
              "border",
              "transition",
              "shadow",
              "gradient",
              "typography",
              "string",
              "boolean"
            ],
            "description": "The types of DTCG 2025.10, plus string and boolean (Figma variables). Inherited from the closest group when the token sets none."
          },
          "$value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "array",
                "items": {}
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            ],
            "description": "A value as DTCG 2025.10 writes it for the type (a colour object, { value, unit }, a composite …), a scalar, or an alias such as \"{Colors.Brand.Primary}\"."
          },
          "$description": {
            "type": "string"
          },
          "$deprecated": {
            "description": "true, or the explanation (for example which token to use instead).",
            "type": [
              "boolean",
              "string"
            ]
          },
          "$extensions": {
            "type": "object",
            "properties": {
              "com.figma": {
                "type": "object",
                "properties": {
                  "hiddenFromPublishing": {
                    "type": "boolean"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "codeSyntax": {
                    "type": "object",
                    "properties": {
                      "WEB": {
                        "type": "string"
                      },
                      "ANDROID": {
                        "type": "string"
                      },
                      "iOS": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": {}
                  }
                },
                "additionalProperties": {},
                "description": "Figma-specific variable metadata, kept when pushing to Figma."
              }
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "$value"
        ],
        "additionalProperties": false,
        "description": "A design token: one variable in one mode."
      },
      {
        "$ref": "#"
      }
    ]
  },
  "description": "A group of tokens and further groups. Group names become the variable path; $type and $deprecated apply to the tokens below."
}
