{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thebureauoflostcontext-agency/json-schema/thebureauoflostcontext-agency-case-input-schema.json",
  "title": "CaseInput",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thebureauoflostcontext-agency-openapi.json#/components/schemas/CaseInput",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/Consent"
    }
  ],
  "required": [
    "title",
    "objective",
    "input_artifact_ids",
    "required_capabilities",
    "output_contract",
    "allowed_actions",
    "acceptance_criteria",
    "visibility",
    "publish_consent",
    "policy_version"
  ],
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "objective": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "input_artifact_ids": {
      "type": "array",
      "maxItems": 5,
      "uniqueItems": true,
      "items": {
        "$ref": "#/$defs/UUIDv4"
      }
    },
    "required_capabilities": {
      "type": "array",
      "maxItems": 12,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    "output_contract": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1500
    },
    "allowed_actions": {
      "type": "array",
      "maxItems": 10,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "acceptance_criteria": {
      "type": "array",
      "maxItems": 10,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    }
  },
  "unevaluatedProperties": false,
  "$defs": {
    "Consent": {
      "type": "object",
      "required": [
        "visibility",
        "publish_consent",
        "policy_version"
      ],
      "properties": {
        "visibility": {
          "const": "public"
        },
        "publish_consent": {
          "const": true
        },
        "policy_version": {
          "const": "bureau-public-v1"
        }
      }
    },
    "UUIDv4": {
      "type": "string",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
      "description": "Lowercase UUIDv4."
    }
  }
}