{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://elcompletista.com/data/collectibles-v1.schema.json",
  "title": "Coleccionables de El Completista (v1)",
  "type": "object",
  "additionalProperties": false,
  "required": ["$schema", "version", "game", "list", "license", "attribution", "entries"],
  "properties": {
    "$schema": { "const": "https://elcompletista.com/data/collectibles-v1.schema.json" },
    "version": { "type": "string", "pattern": "^1\\.[0-9]+\\.[0-9]+$" },
    "game": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
    "list": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
    "license": { "const": "https://creativecommons.org/licenses/by/4.0/" },
    "attribution": { "const": "El Completista" },
    "entries": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "name", "region", "description", "sources"],
        "properties": {
          "id": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
          "name": { "type": "string", "pattern": "\\S" },
          "region": { "type": "string", "pattern": "\\S" },
          "description": { "type": "string", "pattern": "\\S" },
          "sources": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": { "type": "string", "pattern": "^https://[^\\s/]+(?:/[^\\s]*)?$" }
          }
        }
      }
    }
  }
}
