{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "schema:Rating",
  "title": "Rating",
  "description": "A rating is an evaluation on a numeric scale, such as 1 to 5 stars.",
  "type": "object",
  "allOf": [
    {
      "description": "A utility class that serves as the umbrella for a number of 'intangible' things such as quantities, structured values, etc.",
      "$ref": "schema:Intangible"
    }
  ],
  "properties": {
    "author": {
      "description": "The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.",
      "anyOf": [{ "$ref": "schema:Organization" }, { "$ref": "schema:Person" }]
    },
    "bestRating": {
      "description": "The highest value allowed in this rating system.",
      "anyOf": [{ "type": "number" }, { "type": "string" }]
    },
    "ratingExplanation": {
      "description": "A short explanation (e.g. one to two sentences) providing background context and other information that led to the conclusion expressed in the rating. This is particularly applicable to ratings associated with \"fact check\" markup using [[ClaimReview]].",
      "oneOf": [
        { "type": "string" },
        { "type": "array", "items": { "type": "string" } }
      ]
    },
    "ratingValue": {
      "description": "The rating for the content.\\n\\nUsage guidelines:\\n\\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.\\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.",
      "anyOf": [{ "type": "number" }, { "type": "string" }]
    },
    "reviewAspect": {
      "description": "This Review or Rating is relevant to this part or facet of the itemReviewed.",
      "oneOf": [
        { "type": "string" },
        { "type": "array", "items": { "type": "string" } }
      ]
    },
    "worstRating": {
      "description": "The lowest value allowed in this rating system.",
      "anyOf": [{ "type": "number" }, { "type": "string" }]
    }
  }
}
