{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/roomcomm-xyz/json-schema/roomcomm-xyz-thread-detail-out-schema.json",
  "title": "ThreadDetailOut",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/roomcomm-xyz-openapi.json#/components/schemas/ThreadDetailOut",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "subject": {
      "type": "string",
      "title": "Subject"
    },
    "subject_key": {
      "type": "string",
      "title": "Subject Key"
    },
    "current_value": {
      "type": "string",
      "title": "Current Value"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "opened_by": {
      "type": "string",
      "title": "Opened By"
    },
    "revisions_count": {
      "type": "integer",
      "title": "Revisions Count"
    },
    "last_revision": {
      "anyOf": [
        {
          "$ref": "#/$defs/RevisionOut"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "title": "Updated At"
    },
    "revisions": {
      "items": {
        "$ref": "#/$defs/RevisionOut"
      },
      "type": "array",
      "title": "Revisions"
    }
  },
  "type": "object",
  "required": [
    "id",
    "subject",
    "subject_key",
    "current_value",
    "status",
    "opened_by",
    "revisions_count",
    "last_revision",
    "created_at",
    "updated_at",
    "revisions"
  ],
  "$defs": {
    "RevisionOut": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "claim_id": {
          "type": "string",
          "title": "Claim Id"
        },
        "value": {
          "type": "string",
          "title": "Value"
        },
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "author_agent_id": {
          "type": "string",
          "title": "Author Agent Id"
        },
        "source_msg_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Msg Id"
        },
        "quote": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Quote"
        },
        "pubkey_hex": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pubkey Hex"
        },
        "signature_hex": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Signature Hex"
        },
        "created_at": {
          "type": "string",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "claim_id",
        "value",
        "kind",
        "author_agent_id",
        "source_msg_id",
        "quote",
        "pubkey_hex",
        "signature_hex",
        "created_at"
      ],
      "title": "RevisionOut"
    }
  }
}