{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "L04 bilingual_journey input schema",
  "description": "Strict input shape. Blank templates are preparation scaffolds, not runnable inputs.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "journey_id",
    "expected_language",
    "reviewer_id",
    "approved_translations",
    "touchpoints",
    "routes"
  ],
  "properties": {
    "journey_id": {
      "type": "string",
      "minLength": 1
    },
    "expected_language": {
      "type": "string",
      "minLength": 1
    },
    "reviewer_id": {
      "type": "string",
      "minLength": 1
    },
    "approved_translations": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "translation_id",
          "source_text",
          "approved_text",
          "language",
          "approval_ref"
        ],
        "properties": {
          "translation_id": {
            "type": "string",
            "minLength": 1
          },
          "source_text": {
            "type": "string"
          },
          "approved_text": {
            "type": "string"
          },
          "language": {
            "type": "string",
            "minLength": 1
          },
          "approval_ref": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "touchpoints": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "capture_id",
          "url",
          "declared_language",
          "segments",
          "route_key"
        ],
        "properties": {
          "capture_id": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string"
          },
          "declared_language": {
            "type": [
              "string",
              "null"
            ]
          },
          "segments": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "segment_id",
                "translation_id",
                "text"
              ],
              "properties": {
                "segment_id": {
                  "type": "string",
                  "minLength": 1
                },
                "translation_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "route_key": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "routes": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "route_key",
          "supported_languages",
          "approval_ref"
        ],
        "properties": {
          "route_key": {
            "type": "string",
            "minLength": 1
          },
          "supported_languages": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "approval_ref": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    }
  }
}
