{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nmdvcell.com/resource/api/v2/claim.schema.json",
  "title": "NMD-VCell Claim Object",
  "description": "A versioned, bounded statement linked to evidence objects, limitations, downstream consumers and a next-evidence condition.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "claim_id",
    "version",
    "title",
    "claim_class",
    "claim_scope",
    "statement",
    "evidence_state",
    "lifecycle_state",
    "subject_ids",
    "quantitative_state",
    "evidence_objects",
    "claim_ceiling",
    "does_not_imply",
    "next_evidence",
    "generated_by",
    "used_by",
    "claim_dependencies",
    "supersedes",
    "is_new_scientific_claim",
    "claim_object_sha256"
  ],
  "properties": {
    "claim_id": {
      "type": "string",
      "pattern": "^CLAIM:"
    },
    "version": {
      "type": "string",
      "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "claim_class": {
      "enum": [
        "scientific_boundary",
        "engineering_status",
        "failure_record",
        "missing_result",
        "scientific_interpretation",
        "publication_status"
      ]
    },
    "claim_scope": {
      "enum": [
        "EVIDENCE_BOUNDARY",
        "ENGINEERING_STATUS",
        "MISSING_RESULT",
        "BOUNDED_SCIENTIFIC_INTERPRETATION",
        "PUBLICATION_STATUS"
      ]
    },
    "statement": {
      "type": "string",
      "minLength": 1
    },
    "evidence_state": {
      "enum": [
        "OBSERVED_ENGINEERING",
        "BOUNDED_INTERPRETATION",
        "FAILURE_RETAINED",
        "MISSING",
        "WORKING"
      ]
    },
    "lifecycle_state": {
      "enum": [
        "ACTIVE",
        "BLOCKED",
        "SUPERSEDED"
      ]
    },
    "subject_ids": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "quantitative_state": {
      "type": "object"
    },
    "evidence_objects": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object_id",
          "role",
          "public_path"
        ],
        "properties": {
          "object_id": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "enum": [
              "SUPPORTS",
              "LIMITS",
              "RECORDS_FAILURE",
              "RECORDS_ABSENCE",
              "DEFINES_MEMBERSHIP"
            ]
          },
          "public_path": {
            "type": "string",
            "pattern": "^/resource/"
          }
        }
      }
    },
    "claim_ceiling": {
      "type": "string",
      "minLength": 1
    },
    "does_not_imply": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "next_evidence": {
      "type": "string",
      "minLength": 1
    },
    "generated_by": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "used_by": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object_id",
          "public_path"
        ],
        "properties": {
          "object_id": {
            "type": "string",
            "minLength": 1
          },
          "public_path": {
            "type": "string",
            "pattern": "^/resource/"
          }
        }
      }
    },
    "claim_dependencies": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "claim_id",
          "relation"
        ],
        "properties": {
          "claim_id": {
            "type": "string",
            "pattern": "^CLAIM:"
          },
          "relation": {
            "enum": [
              "MISSING_BECAUSE",
              "LIMITED_BY"
            ]
          }
        }
      }
    },
    "supersedes": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^CLAIM:"
      }
    },
    "is_new_scientific_claim": {
      "const": false
    },
    "claim_object_sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  }
}
