{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pictify-io/json-schema/pictify-io-variable-definition-schema.json",
  "title": "VariableDefinition",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pictify-io-images-api-openapi.yml#/components/schemas/VariableDefinition",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Variable identifier. Must match the name used in `{{name}}` tokens."
    },
    "type": {
      "type": "string",
      "enum": [
        "text",
        "image",
        "color",
        "chart",
        "table",
        "array",
        "object"
      ],
      "default": "text"
    },
    "defaultValue": {
      "description": "Fallback value when the variable is not supplied at render time.\nTyped according to `type` — string for text/image/color/url, number for number,\nboolean for boolean, ISO date string for date, JSON array/object for array/object.\n"
    },
    "description": {
      "type": "string"
    },
    "allowRawHtml": {
      "type": "boolean",
      "description": "Only meaningful for `type=text` on `engine=html` templates. When true the value\nis NOT HTML-escaped at render time. Use with care — treat as trusted input.\n",
      "default": false
    },
    "validation": {
      "type": "object",
      "properties": {
        "required": {
          "type": "boolean"
        },
        "minLength": {
          "type": "integer"
        },
        "maxLength": {
          "type": "integer"
        }
      }
    }
  }
}