{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Research Source Assessment",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "source_id",
    "title",
    "source_type",
    "canonical_uri",
    "retrieved_at",
    "authority_score",
    "applicability"
  ],
  "properties": {
    "source_id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "source_type": {
      "enum": [
        "LOCAL_OFFICIAL",
        "REGULATORY",
        "PEER_REVIEWED",
        "SYSTEMATIC_REVIEW",
        "UNIVERSITY_EXTENSION",
        "GOVERNMENT",
        "DATASET",
        "OTHER_WEB"
      ]
    },
    "canonical_uri": {
      "type": "string",
      "format": "uri"
    },
    "doi_or_identifier": {
      "type": [
        "string",
        "null"
      ]
    },
    "publisher": {
      "type": [
        "string",
        "null"
      ]
    },
    "published_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "retrieved_at": {
      "type": "string",
      "format": "date-time"
    },
    "authority_score": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "peer_review_status": {
      "enum": [
        "VERIFIED",
        "NOT_APPLICABLE",
        "UNVERIFIED"
      ]
    },
    "retraction_check": {
      "enum": [
        "CLEAR",
        "FOUND",
        "NOT_CHECKED"
      ]
    },
    "applicability": {
      "type": "object",
      "required": [
        "crop",
        "geography",
        "climate",
        "overall"
      ],
      "properties": {
        "crop": {
          "type": "string"
        },
        "geography": {
          "type": "string"
        },
        "climate": {
          "type": "string"
        },
        "overall": {
          "enum": [
            "LOW",
            "MEDIUM",
            "HIGH"
          ]
        }
      }
    },
    "key_findings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "snapshot_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "content_hash": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}