{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://factapi.com/examples/claim-assessment.schema.json",
  "title": "FactAPI.com illustrative claim-assessment contract",
  "description": "An example contract for local fictional records; not a hosted API specification.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "example",
    "claim_id",
    "claim_text",
    "scope",
    "processing_status",
    "assessment"
  ],
  "properties": {
    "schema_version": {
      "const": "1.0"
    },
    "example": {
      "const": true
    },
    "claim_id": {
      "type": "string",
      "minLength": 1
    },
    "claim_text": {
      "type": "string",
      "minLength": 1
    },
    "scope": {
      "type": "string",
      "minLength": 1
    },
    "processing_status": {
      "const": "complete"
    },
    "assessment": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "status",
        "reason",
        "evidence"
      ],
      "properties": {
        "status": {
          "enum": [
            "supported",
            "contradicted",
            "insufficient_evidence"
          ]
        },
        "reason": {
          "type": "string",
          "minLength": 1
        },
        "evidence": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "source_id",
              "source_title",
              "source_url",
              "locator",
              "passage",
              "relationship"
            ],
            "properties": {
              "source_id": {
                "type": "string",
                "minLength": 1
              },
              "source_title": {
                "type": "string",
                "minLength": 1
              },
              "source_url": {
                "type": "string",
                "format": "uri"
              },
              "locator": {
                "type": "string",
                "minLength": 1
              },
              "passage": {
                "type": "string",
                "minLength": 1
              },
              "relationship": {
                "enum": [
                  "supports",
                  "contradicts",
                  "provides_context"
                ]
              }
            }
          }
        }
      }
    }
  }
}
