{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fareeqy-com/json-schema/fareeqy-com-comment-collection-schema.json",
  "title": "CommentCollection",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fareeqy-com-comments-api-openapi.yml#/components/schemas/CommentCollection",
  "allOf": [
    {
      "$ref": "#/$defs/CollectionMeta"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Comment"
          }
        }
      }
    }
  ],
  "$defs": {
    "CollectionMeta": {
      "type": "object",
      "properties": {
        "meta": {
          "type": "object",
          "properties": {
            "total": {
              "type": "integer",
              "description": "The full unfiltered count."
            },
            "limit": {
              "type": "integer"
            },
            "offset": {
              "type": "integer"
            },
            "count": {
              "type": "integer",
              "description": "Records in the returned page."
            }
          }
        }
      }
    },
    "Comment": {
      "type": "object",
      "description": "A comment (on a task list or task) or a majlis reply.",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Numeric id (comments have no slug)."
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "The page the comment is read on, which is its parent's page. Every comment in one thread carries the same address."
        },
        "content": {
          "type": [
            "string",
            "null"
          ],
          "description": "Plain-text rendering of the rich-text content."
        },
        "author": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "description": "Equal to created_at until the comment is edited."
        },
        "attachments": {
          "type": "array",
          "description": "Files embedded in the comment body. The plain-text `content` drops attachments entirely, so without these a comment that refers to a screenshot reads as a sentence pointing at nothing. Empty when there are none. Read a text attachment through the comment attachment endpoint, by its `id`.\n",
          "items": {
            "$ref": "#/$defs/CommentAttachmentRef"
          }
        }
      }
    },
    "CommentAttachmentRef": {
      "type": "object",
      "description": "A file embedded in a comment, as the comment lists it.",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The attachment's numeric id, the handle the comment attachment endpoint takes."
        },
        "name": {
          "type": "string",
          "description": "The file name. Not unique within one comment."
        },
        "content_type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Null when the stored file is missing."
        },
        "byte_size": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Null when the stored file is missing."
        }
      }
    }
  }
}