{
  "lexicon": 1,
  "id": "net.bisks.steamtags.rating",
  "defs": {
    "main": {
      "type": "record",
      "description": "A person's own fit ratings (1-10) for a Steam game's community tags, snapshotted at rating time. One record per game — the record key is the Steam appid, so re-rating a game overwrites its record in place rather than creating a new one. Written and read by steamtags (https://steamtags.bisks.net).",
      "key": "any",
      "record": {
        "type": "object",
        "required": ["appid", "tags", "updatedAt"],
        "properties": {
          "appid": {
            "type": "integer",
            "description": "The Steam application id of the game being rated. The record's rkey is this value as a string."
          },
          "name": {
            "type": "string",
            "maxLength": 640,
            "maxGraphemes": 200,
            "description": "The game's Steam store name, snapshotted at rating time."
          },
          "headerImage": {
            "type": "string",
            "maxLength": 1000,
            "description": "URL of the game's Steam store header image, snapshotted at rating time."
          },
          "tags": {
            "type": "array",
            "maxLength": 32,
            "items": { "type": "ref", "ref": "#tagRating" },
            "description": "The community tags rated for this game. Sourced from SteamSpy's mirror of the game's Steam Store community tags."
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this record was last written, as an ISO 8601 datetime."
          }
        }
      }
    },
    "tagRating": {
      "type": "object",
      "required": ["tag", "score"],
      "properties": {
        "tag": {
          "type": "string",
          "maxLength": 60,
          "maxGraphemes": 60,
          "description": "A SteamSpy/Steam community tag name, e.g. \"Roguelike\" or \"Atmospheric\"."
        },
        "score": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10,
          "description": "The rater's own judgement of how well this tag actually fits the game, 1 (not at all) to 10 (perfectly) — never algorithmically derived."
        },
        "votes": {
          "type": "integer",
          "minimum": 0,
          "description": "SteamSpy's community vote count for this tag on this game, snapshotted at rating time. Not the rater's own vote — context for how established the tag is."
        }
      }
    }
  }
}
