{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yukkurigen-com/json-schema/yukkurigen-com-material-hold-schema.json",
  "title": "MaterialHold",
  "description": "資料の配置区間（2026-10-31）。同じ id を書いた続いた行を1つの区間にし、話者が変わっても資料の位置・大きさ・重なり順を止める。位置・見た目（materialBox・materialStyle）・anchor・protect は区間の最初の行で決まり、2行目以降に違う値を書いても使わない（GET /projects/{id} の materialWarnings）。2行目以降は materialImageUrl を省けば同じ画像、書けば枠を保って画像だけ差し替える。東北式とその複製だけ（ほかは 400 unsupported_field）。",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yukkurigen-com-openapi.json#/components/schemas/MaterialHold",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "anchor": {
      "type": "string",
      "enum": [
        "screen",
        "scene"
      ],
      "description": "screen=画面に固定（既定。カメラの寄り・話者への寄りで動かない）/ scene=カメラと一緒に寄る"
    },
    "protect": {
      "type": "array",
      "maxItems": 8,
      "description": "字幕の箱（台詞・心の声）がよける範囲（画面の %、x/y は左上）。キャラは動かさない",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "x",
          "y",
          "width",
          "height"
        ],
        "properties": {
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 100
          },
          "height": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 100
          }
        }
      }
    }
  }
}