{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://botlandscape.com/claims.schema.json",
  "title": "Bot Landscape filtered compare-index claim slice",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "schema_version",
    "projection",
    "source_schema_version",
    "compare_index_url",
    "entity_id",
    "convention",
    "counts",
    "tables",
    "sources"
  ],
  "properties": {
    "$schema": {"const": "https://botlandscape.com/claims.schema.json"},
    "schema_version": {"const": 1},
    "projection": {"const": "filtered-compare-index"},
    "source_schema_version": {"type": "integer", "minimum": 1},
    "compare_index_url": {"type": "string", "format": "uri"},
    "entity_id": {"type": "string", "minLength": 1},
    "convention": {"$ref": "#/$defs/convention"},
    "counts": {
      "type": "object",
      "additionalProperties": false,
      "required": ["tables", "rows", "claims", "sources"],
      "properties": {
        "tables": {"type": "integer", "minimum": 0},
        "rows": {"type": "integer", "minimum": 0},
        "claims": {"type": "integer", "minimum": 0},
        "sources": {"type": "integer", "minimum": 0}
      }
    },
    "tables": {"type": "array"},
    "sources": {"type": "array"}
  },
  "$defs": {
    "convention": {
      "type": "object",
      "additionalProperties": false,
      "required": ["class", "metric_id", "state", "evidence_grade"],
      "properties": {
        "class": {"type": "string", "minLength": 1},
        "metric_id": {"type": "string", "minLength": 1},
        "state": {"type": "string", "minLength": 1},
        "evidence_grade": {"type": "string", "minLength": 1}
      }
    }
  }
}
