{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getcheapgames-com/json-schema/getcheapgames-com-review-page-out-schema.json",
  "title": "ReviewPageOut",
  "description": "`GET /api/games/{slug}/reviews`: the rating, and a page of the reviews, newest first.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getcheapgames-com-reviews-api-openapi.yml#/components/schemas/ReviewPageOut",
  "properties": {
    "summary": {
      "$ref": "#/$defs/ReviewSummaryOut"
    },
    "items": {
      "items": {
        "$ref": "#/$defs/ReviewItemOut"
      },
      "type": "array",
      "title": "Items"
    },
    "total": {
      "type": "integer",
      "title": "Total"
    }
  },
  "type": "object",
  "required": [
    "summary",
    "items",
    "total"
  ],
  "$defs": {
    "ReviewItemOut": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "username": {
          "type": "string",
          "title": "Username"
        },
        "rating": {
          "type": "number",
          "title": "Rating"
        },
        "body": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Body"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "title": "Createdat"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "title": "Updatedat"
        }
      },
      "type": "object",
      "required": [
        "id",
        "username",
        "rating",
        "body",
        "createdAt",
        "updatedAt"
      ],
      "title": "ReviewItemOut",
      "description": "One visible review, as the list shows it."
    },
    "ReviewSummaryOut": {
      "properties": {
        "average": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Average"
        },
        "count": {
          "type": "integer",
          "title": "Count"
        },
        "distribution": {
          "items": {
            "type": "integer"
          },
          "type": "array",
          "title": "Distribution"
        }
      },
      "type": "object",
      "required": [
        "average",
        "count",
        "distribution"
      ],
      "title": "ReviewSummaryOut",
      "description": "The GCG rating of a product, over its visible reviews (`service.Summary`)."
    }
  }
}