{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yukkurigen-com/json-schema/yukkurigen-com-line-caption-schema.json",
  "title": "LineCaption",
  "description": "行の字幕の出し方（2026-10-31）。知らない項目は 400。",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yukkurigen-com-openapi.json#/components/schemas/LineCaption",
  "type": "object",
  "additionalProperties": false,
  "minProperties": 1,
  "properties": {
    "role": {
      "type": "string",
      "enum": [
        "narration",
        "dialogue",
        "thought"
      ],
      "description": "narration=画面の下の字幕枠 / dialogue=話者の下の短い箱 / thought=心の声（括弧＋淡い地色の短い箱を字幕枠の高さの真ん中・左右の真ん中に。話者の札なし。口パクは行の speechMode で別に決める）"
    },
    "anchor": {
      "type": "string",
      "enum": [
        "screen-bottom",
        "speaker-lower"
      ],
      "description": "省くと role から（narration・thought→screen-bottom・dialogue→speaker-lower）。role と食い違えば 400"
    },
    "speakerId": {
      "type": "string",
      "description": "箱を付けるキャラ（省くとその行の話者）"
    },
    "skinId": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
      "description": "テンプレートの captionSkins の名前"
    },
    "maxLines": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4
    },
    "safeAreaProfile": {
      "type": "string",
      "enum": [
        "youtube-landscape",
        "youtube-shorts"
      ]
    },
    "boxOverride": {
      "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
        }
      },
      "description": "字幕の枠（画面の %）。x+width・y+height は 100 以下"
    }
  }
}