{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/zelto/main/json-schema/zelto-finding-schema.json",
  "title": "Finding",
  "x-generated": "2026-10-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zelto-openapi.json#/components/schemas/Finding",
  "type": "object",
  "required": [
    "id",
    "title",
    "status",
    "priority",
    "tags",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "object",
      "additionalProperties": true,
      "description": "TipTap JSON document. May contain `agentPrompt` blocks ({type: agentPrompt, attrs: {agentId, agentName, agentVersionId?, versionNumber?, lineStart?, lineEnd?, excerpt}}); `excerpt` must be verbatim from that agent version's system prompt, else 400."
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "acknowledged",
        "resolved",
        "ignored"
      ]
    },
    "priority": {
      "type": "string",
      "enum": [
        "none",
        "low",
        "medium",
        "high",
        "urgent"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "findingType": {
      "type": [
        "integer",
        "null"
      ]
    },
    "assigneeUserId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}