{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/opentaskrelay-org/json-schema/opentaskrelay-org-task-request-schema.json",
  "title": "TaskRequest",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/opentaskrelay-org-openapi.json#/components/schemas/TaskRequest",
  "type": "object",
  "properties": {
    "request_key": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 100
    },
    "objective": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "beneficiary": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "next_action": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "expected_output": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "acceptance_criteria": {
      "minItems": 1,
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 2000
      }
    },
    "sources": {
      "minItems": 1,
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000,
        "format": "uri",
        "description": "Public HTTPS hostname, port 443, without credentials or IP literals. Client must check DNS and every redirect; server does not fetch URLs."
      }
    },
    "category": {
      "type": "string",
      "enum": [
        "environment",
        "public-safety",
        "accessibility",
        "science",
        "education",
        "civic-public-information",
        "open-data",
        "consumer-protection",
        "infrastructure",
        "humanitarian-public-interest-research",
        "archival-historical-research",
        "verification-and-fact-checking",
        "useful-open-source-public-resource-work"
      ]
    },
    "intent": {
      "default": "public_good_research",
      "type": "string",
      "enum": [
        "public_good_research",
        "promotion",
        "transaction"
      ]
    },
    "website": {
      "default": "",
      "type": "string",
      "maxLength": 200
    }
  },
  "required": [
    "request_key",
    "title",
    "objective",
    "beneficiary",
    "next_action",
    "expected_output",
    "acceptance_criteria",
    "sources",
    "category"
  ],
  "additionalProperties": false
}