{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-experience-cloud/json-schema/salesforce-experience-cloud-comment-page-schema.json",
  "title": "CommentPage",
  "description": "Paginated list of comments",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-experience-cloud-feeds-api-openapi.yml#/components/schemas/CommentPage",
  "type": "object",
  "properties": {
    "comments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Comment"
      }
    },
    "currentPageToken": {
      "type": "string"
    },
    "currentPageUrl": {
      "type": "string",
      "format": "uri"
    },
    "nextPageToken": {
      "type": "string"
    },
    "nextPageUrl": {
      "type": "string",
      "format": "uri"
    },
    "total": {
      "type": "integer"
    }
  },
  "$defs": {
    "ActorReference": {
      "type": "object",
      "description": "Reference to a user or record",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Comment": {
      "type": "object",
      "description": "A comment on a feed element",
      "properties": {
        "id": {
          "type": "string"
        },
        "body": {
          "$ref": "#/$defs/MessageBody"
        },
        "createdDate": {
          "type": "string",
          "format": "date-time"
        },
        "feedElement": {
          "$ref": "#/$defs/ActorReference"
        },
        "likes": {
          "$ref": "#/$defs/LikePage"
        },
        "user": {
          "$ref": "#/$defs/ActorReference"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Like": {
      "type": "object",
      "description": "A like on a feed element or comment",
      "properties": {
        "id": {
          "type": "string"
        },
        "createdDate": {
          "type": "string",
          "format": "date-time"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "user": {
          "$ref": "#/$defs/ActorReference"
        }
      }
    },
    "LikePage": {
      "type": "object",
      "description": "Paginated list of likes",
      "properties": {
        "currentPageToken": {
          "type": "string"
        },
        "currentPageUrl": {
          "type": "string",
          "format": "uri"
        },
        "likes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Like"
          }
        },
        "nextPageToken": {
          "type": "string"
        },
        "nextPageUrl": {
          "type": "string",
          "format": "uri"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "MessageBody": {
      "type": "object",
      "description": "Rich text body of a feed element or comment",
      "properties": {
        "isRichText": {
          "type": "boolean"
        },
        "messageSegments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MessageSegment"
          }
        },
        "text": {
          "type": "string"
        }
      }
    },
    "MessageSegment": {
      "type": "object",
      "description": "A segment of a message body",
      "properties": {
        "text": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "Text",
            "Mention",
            "Hashtag",
            "Link",
            "MarkupBegin",
            "MarkupEnd"
          ]
        }
      }
    }
  }
}