{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/balladic-com/json-schema/balladic-com-paginated-comments-response-schema.json",
  "title": "PaginatedCommentsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/balladic-com-comments-api-openapi.yml#/components/schemas/PaginatedCommentsResponse",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/CommentResponse"
      },
      "type": "array",
      "title": "Items"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor"
    }
  },
  "type": "object",
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "AttachmentResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "number": {
          "type": "integer",
          "title": "Number"
        },
        "filename": {
          "type": "string",
          "title": "Filename"
        },
        "content_type": {
          "type": "string",
          "title": "Content Type"
        },
        "size_bytes": {
          "type": "integer",
          "title": "Size Bytes"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "number",
        "filename",
        "content_type",
        "size_bytes",
        "created_at"
      ],
      "title": "AttachmentResponse"
    },
    "CommentResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "number": {
          "type": "integer",
          "title": "Number"
        },
        "task_id": {
          "type": "string",
          "format": "uuid",
          "title": "Task Id"
        },
        "user_id": {
          "type": "string",
          "format": "uuid",
          "title": "User Id"
        },
        "body": {
          "additionalProperties": true,
          "type": "object",
          "title": "Body"
        },
        "reply_to_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reply To Id"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Updated At"
        },
        "attachments": {
          "items": {
            "$ref": "#/$defs/AttachmentResponse"
          },
          "type": "array",
          "title": "Attachments"
        },
        "reactions": {
          "items": {
            "$ref": "#/$defs/ReactionSummary"
          },
          "type": "array",
          "title": "Reactions",
          "default": []
        },
        "external": {
          "anyOf": [
            {
              "$ref": "#/$defs/ExternalCommentResponse"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "id",
        "number",
        "task_id",
        "user_id",
        "body",
        "reply_to_id",
        "created_at",
        "updated_at",
        "attachments"
      ],
      "title": "CommentResponse"
    },
    "ExternalCommentResponse": {
      "properties": {
        "provider": {
          "type": "string",
          "title": "Provider"
        },
        "origin": {
          "type": "string",
          "enum": [
            "local",
            "remote"
          ],
          "title": "Origin"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url"
        },
        "markdown": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Markdown"
        },
        "author": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Author"
        }
      },
      "type": "object",
      "required": [
        "provider",
        "origin",
        "url",
        "markdown",
        "author"
      ],
      "title": "ExternalCommentResponse"
    },
    "ReactionSummary": {
      "properties": {
        "emoji": {
          "type": "string",
          "title": "Emoji"
        },
        "count": {
          "type": "integer",
          "title": "Count"
        },
        "user_ids": {
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "type": "array",
          "title": "User Ids"
        }
      },
      "type": "object",
      "required": [
        "emoji",
        "count",
        "user_ids"
      ],
      "title": "ReactionSummary"
    }
  }
}