{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vidplate-app/json-schema/vidplate-app-template-fields-schema.json",
  "title": "TemplateFields",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vidplate-app-openapi.json#/components/schemas/TemplateFields",
  "type": "object",
  "required": [
    "object",
    "template_id",
    "template_code",
    "kind",
    "version",
    "fields"
  ],
  "properties": {
    "object": {
      "const": "template_fields"
    },
    "template_id": {
      "type": "string"
    },
    "template_code": {
      "type": "string",
      "description": "The existing 24-hex template code; the corresponding template_id has a tpl_ prefix."
    },
    "kind": {
      "enum": [
        "static",
        "video"
      ]
    },
    "engine": {
      "enum": [
        "vidcanvas",
        "vidmotion"
      ]
    },
    "version": {
      "type": "integer"
    },
    "status": {
      "enum": [
        "active",
        "deprecated",
        "archived"
      ]
    },
    "schema_hash": {
      "type": "string"
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "type",
          "label",
          "required",
          "default",
          "constraints"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "default": {
            "description": "Actual schema default, or null when none. Text placeholders are not defaults."
          },
          "placeholder": {
            "type": [
              "string",
              "null"
            ]
          },
          "section": {
            "type": [
              "string",
              "null"
            ]
          },
          "constraints": {
            "type": "object",
            "description": "The selected version schema constraints, including max_length in Unicode code points, enum, pattern, format, and media mime_types/max_bytes/max_pixels/max_duration_seconds when applicable."
          },
          "option_labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "timestamp_seconds": {
            "type": "number"
          },
          "font_role": {
            "type": "string"
          },
          "brand_asset_role": {
            "type": "string"
          },
          "controls_presence_of": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "drops_layers_when_empty": {
            "type": "boolean"
          },
          "ai_credits": {
            "type": "boolean"
          }
        }
      }
    }
  }
}