{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postlake-dev/json-schema/postlake-dev-comment-schema.json",
  "title": "Comment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postlake-dev-reading-api-openapi.yml#/components/schemas/Comment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "platform": {
      "type": "string"
    },
    "account": {
      "type": "string",
      "description": "The connection (acc_…) this comment was read through. Pass it back when you reply, hide, like or delete."
    },
    "author": {
      "$ref": "#/$defs/SocialActor"
    },
    "text": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "url": {
      "type": [
        "string",
        "null"
      ]
    },
    "replyCount": {
      "type": "integer"
    },
    "likeCount": {
      "type": "integer"
    },
    "hidden": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether this reply is currently hidden. null where the network does not say, which is not the same as false: an agent that reads null as 'not hidden' will keep trying to hide the same reply."
    },
    "replies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Comment"
      }
    }
  },
  "$defs": {
    "Comment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "account": {
          "type": "string",
          "description": "The connection (acc_…) this comment was read through. Pass it back when you reply, hide, like or delete."
        },
        "author": {
          "$ref": "#/$defs/SocialActor"
        },
        "text": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "url": {
          "type": [
            "string",
            "null"
          ]
        },
        "replyCount": {
          "type": "integer"
        },
        "likeCount": {
          "type": "integer"
        },
        "hidden": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether this reply is currently hidden. null where the network does not say, which is not the same as false: an agent that reads null as 'not hidden' will keep trying to hide the same reply."
        },
        "replies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Comment"
          }
        }
      }
    },
    "SocialActor": {
      "type": "object",
      "properties": {
        "handle": {
          "type": "string"
        },
        "displayName": {
          "type": [
            "string",
            "null"
          ]
        },
        "avatarUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The network's own id, for follow/block/mute"
        }
      }
    }
  }
}