{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/imagestep-dev/json-schema/imagestep-dev-template-data-schema.json",
  "title": "TemplateData",
  "description": "HTML/CSS render template with {{ var }} placeholders; the input of the render_template op",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/imagestep-dev-openapi.json#/components/schemas/TemplateData",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Template id (`tpl_…`; a built-in's is `builtin-template-…`). A version read by `id@version` carries that spelling here.",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "Display name (required on create; at most 200 characters)"
    },
    "slug": {
      "type": "string",
      "description": "URL-safe handle, unique per account: lowercase letters, digits and hyphens. Generated from the name when omitted; one you send must be free. `builtin-` is reserved."
    },
    "description": {
      "type": "string",
      "description": "Free text for people; not rendered. `\"\"` on a PUT empties it."
    },
    "html": {
      "type": "string",
      "description": "Body HTML (required on create; ≤ 256 KB as UTF-8). Scripts never run; every request it makes is blocked at render time except `data:` URIs and this product's own asset host."
    },
    "css": {
      "type": "string",
      "description": "Stylesheet (≤ 128 KB as UTF-8). Like the html, it loads nothing but `data:` URIs and this product's own asset host; any other `@import` or `url()` is blocked at render time."
    },
    "width": {
      "type": "integer",
      "format": "int32",
      "description": "Viewport / output width in px (required on create; 1–4096)"
    },
    "height": {
      "type": "integer",
      "format": "int32",
      "description": "Viewport / output height in px (required on create; 1–4096)"
    },
    "variables": {
      "type": "array",
      "description": "Placeholder names (at most 100, each letters, digits, `_` and `.`). Derived from the html/css when omitted. A render fills `{{ name }}` HTML-escaped and `{{{ name }}}` raw; a name the row does not carry renders as nothing.",
      "items": {
        "type": "string"
      }
    },
    "version": {
      "type": "integer",
      "format": "int32",
      "description": "Current version; every PUT increments it and keeps the old one readable as `id@version`",
      "readOnly": true
    },
    "builtIn": {
      "type": "boolean",
      "description": "Whether this is a built-in template (read-only; PUT and DELETE are 403)",
      "readOnly": true
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the template — or, read as `id@version`, that version — was created",
      "readOnly": true
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the current version was saved; absent on a version read as `id@version`",
      "readOnly": true
    }
  }
}