{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ecoaloha-com/json-schema/ecoaloha-com-review-summary-schema.json",
  "title": "ReviewSummary",
  "description": "Traveller reviews supplied by Viator and its partners. EcoAloha does not edit them.",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ecoaloha-com-openapi.json#/components/schemas/ReviewSummary",
  "type": "object",
  "required": [
    "total",
    "counts",
    "reviews"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "minimum": 0,
      "description": "Total review count for the product."
    },
    "average": {
      "type": "number",
      "minimum": 0,
      "maximum": 5,
      "description": "Average rating (1 to 5)."
    },
    "counts": {
      "type": "array",
      "description": "Review count per star rating.",
      "items": {
        "type": "object",
        "required": [
          "rating",
          "count"
        ],
        "properties": {
          "rating": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "count": {
            "type": "integer",
            "minimum": 0
          }
        }
      }
    },
    "reviews": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "rating",
          "text",
          "author",
          "provider",
          "machineTranslated"
        ],
        "properties": {
          "rating": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "title": {
            "type": "string"
          },
          "text": {
            "type": "string",
            "description": "Review text, at most 1200 characters. Partner content."
          },
          "author": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "provider": {
            "type": "string"
          },
          "machineTranslated": {
            "type": "boolean",
            "description": "True when the partner machine-translated the review."
          }
        }
      }
    }
  }
}