{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agilehero-io/json-schema/agilehero-io-comment-schema.json",
  "title": "Comment",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agilehero-io-openapi.yml#/components/schemas/Comment",
  "type": "object",
  "required": [
    "id",
    "body_text",
    "body_markdown",
    "parent",
    "reply_to",
    "deleted",
    "author",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "body_text": {
      "type": [
        "string",
        "null"
      ],
      "description": "The body as plain text; null for a deleted comment."
    },
    "body_markdown": {
      "type": [
        "string",
        "null"
      ],
      "description": "The body as Markdown (see \"Rich text\"); null for a deleted comment."
    },
    "parent": {
      "type": "object",
      "required": [
        "type",
        "id"
      ],
      "description": "What the comment is on.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "card"
          ]
        },
        "id": {
          "type": "string"
        }
      }
    },
    "reply_to": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "id"
      ],
      "description": "The thread root this comment replies to; null for a root comment.",
      "properties": {
        "id": {
          "type": "string"
        }
      }
    },
    "deleted": {
      "type": "boolean"
    },
    "author": {
      "$ref": "#/$defs/Reference"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "Reference": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}