{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "rating": {
      "type": "number",
      "enum": [
        1,
        2,
        3,
        4,
        5
      ],
      "description": "Number of rating stars"
    },
    "userGroup": {
      "$ref": "#/definitions/SCUserGroup",
      "description": "User's group in the app"
    },
    "uid": {
      "$ref": "#/definitions/SCUuid",
      "description": "UID of the thing that is rated"
    }
  },
  "required": [
    "rating",
    "uid"
  ],
  "additionalProperties": false,
  "description": "User rating from the app Plugin needs to define its own rating request to hit the target rating system. That request should extend this one and contain timestamp and other needed data.",
  "definitions": {
    "SCUserGroup": {
      "type": "string",
      "enum": [
        "students",
        "employees",
        "guests"
      ],
      "description": "Types of data consumers"
    },
    "SCUuid": {
      "type": "string",
      "description": "Universally unique identifier of the thing",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
    },
    "SCSCRatingRequest": {
      "type": "object",
      "properties": {
        "rating": {
          "type": "number",
          "enum": [
            1,
            2,
            3,
            4,
            5
          ],
          "description": "Number of rating stars"
        },
        "userGroup": {
          "$ref": "#/definitions/SCUserGroup",
          "description": "User's group in the app"
        },
        "uid": {
          "$ref": "#/definitions/SCUuid",
          "description": "UID of the thing that is rated"
        }
      },
      "required": [
        "rating",
        "uid"
      ],
      "additionalProperties": false,
      "description": "User rating from the app Plugin needs to define its own rating request to hit the target rating system. That request should extend this one and contain timestamp and other needed data."
    }
  },
  "$id": "https://core.stapps.tu-berlin.de/v4.0.2/lib/schema/SCRatingRequest.json"
}