{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/breakreach-com/json-schema/breakreach-com-comment-schema.json",
  "title": "Comment",
  "description": "A comment, or a Google review (platform googlebusiness: postId is the location, rating the stars, replies the business's reply)",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/breakreach-com-openapi.json#/components/schemas/Comment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Pass as commentId to reply or delete. For a Google review, the review id"
    },
    "platform": {
      "type": "string"
    },
    "postId": {
      "type": "string",
      "description": "The platform post id, or the Google location (accounts/{a}/locations/{l})"
    },
    "text": {
      "type": "string",
      "description": "Empty for a Google review with stars only"
    },
    "username": {
      "type": "string"
    },
    "avatarUrl": {
      "type": "string",
      "format": "uri"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "likeCount": {
      "type": "number"
    },
    "hidden": {
      "type": "boolean"
    },
    "rating": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5,
      "description": "Google reviews: the star rating"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "approved",
        "rejected"
      ],
      "description": "The business's reply to a Google review: Google's moderation status"
    },
    "policyViolation": {
      "type": "string",
      "description": "Why Google rejected the reply, e.g. HARASSMENT"
    },
    "replies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Comment"
      }
    },
    "postContent": {
      "type": "string"
    },
    "postUrl": {
      "type": "string",
      "format": "uri"
    },
    "postImage": {
      "type": "string",
      "format": "uri"
    },
    "accountId": {
      "type": "string"
    },
    "accountDisplayName": {
      "type": "string"
    }
  },
  "$defs": {
    "Comment": {
      "type": "object",
      "description": "A comment, or a Google review (platform googlebusiness: postId is the location, rating the stars, replies the business's reply)",
      "properties": {
        "id": {
          "type": "string",
          "description": "Pass as commentId to reply or delete. For a Google review, the review id"
        },
        "platform": {
          "type": "string"
        },
        "postId": {
          "type": "string",
          "description": "The platform post id, or the Google location (accounts/{a}/locations/{l})"
        },
        "text": {
          "type": "string",
          "description": "Empty for a Google review with stars only"
        },
        "username": {
          "type": "string"
        },
        "avatarUrl": {
          "type": "string",
          "format": "uri"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "likeCount": {
          "type": "number"
        },
        "hidden": {
          "type": "boolean"
        },
        "rating": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5,
          "description": "Google reviews: the star rating"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "approved",
            "rejected"
          ],
          "description": "The business's reply to a Google review: Google's moderation status"
        },
        "policyViolation": {
          "type": "string",
          "description": "Why Google rejected the reply, e.g. HARASSMENT"
        },
        "replies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Comment"
          }
        },
        "postContent": {
          "type": "string"
        },
        "postUrl": {
          "type": "string",
          "format": "uri"
        },
        "postImage": {
          "type": "string",
          "format": "uri"
        },
        "accountId": {
          "type": "string"
        },
        "accountDisplayName": {
          "type": "string"
        }
      }
    }
  }
}