{
  "$defs": {
    "Claim": {
      "additionalProperties": false,
      "properties": {
        "field": {
          "description": "Dot-path of the grounded field, e.g. 'cost.amount_mln'",
          "title": "Field",
          "type": "string"
        },
        "value_repr": {
          "description": "String rendering of the stored value",
          "title": "Value Repr",
          "type": "string"
        },
        "quote": {
          "description": "Verbatim snippet from the source supporting the value",
          "minLength": 1,
          "title": "Quote",
          "type": "string"
        },
        "source_url": {
          "title": "Source Url",
          "type": "string"
        },
        "retrieved_at": {
          "pattern": "^\\d{4}(-\\d{2}(-\\d{2})?)?$",
          "title": "Retrieved At",
          "type": "string"
        },
        "verdict": {
          "$ref": "#/$defs/ClaimVerdict",
          "default": "unverified"
        },
        "confidence": {
          "anyOf": [
            {
              "maximum": 1,
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Confidence"
        },
        "note": {
          "default": "",
          "title": "Note",
          "type": "string"
        },
        "scope_note": {
          "default": "",
          "title": "Scope Note",
          "type": "string"
        },
        "scope_note_en": {
          "default": "",
          "title": "Scope Note En",
          "type": "string"
        },
        "source_no": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "description": "Numer zrodla WYSWIETLANY na karcie, liczony od jedynki (references[] indeksuje od zera). null znaczy cytat ze strony, ktorej rekord nie wymienia wsrod referencji - validate.py raportuje takie jako osierocone i API tego nie ukrywa."
        }
      },
      "required": [
        "field",
        "value_repr",
        "quote",
        "source_url",
        "retrieved_at"
      ],
      "title": "Claim",
      "type": "object"
    },
    "ClaimVerdict": {
      "enum": [
        "unverified",
        "confirmed",
        "refuted",
        "unsupported",
        "conflict"
      ],
      "title": "ClaimVerdict",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "properties": {
    "slug": {
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
      "title": "Slug",
      "type": "string"
    },
    "rounds": {
      "default": 1,
      "description": "Grounding-loop rounds this record went through",
      "minimum": 1,
      "title": "Rounds",
      "type": "integer"
    },
    "grounded": {
      "default": false,
      "title": "Grounded",
      "type": "boolean"
    },
    "claims": {
      "items": {
        "$ref": "#/$defs/Claim"
      },
      "title": "Claims",
      "type": "array"
    }
  },
  "required": [
    "slug"
  ],
  "title": "Projektometr – warstwa dowodowa serwowana przez /api/evidence.json",
  "type": "object",
  "$id": "https://projektometr.pl/schema/evidence.schema.json"
}
