{
  "$defs": {
    "ApprovalReference": {
      "additionalProperties": false,
      "properties": {
        "external_id": {
          "minLength": 1,
          "title": "External Id",
          "type": "string"
        },
        "decision_pointer": {
          "minLength": 1,
          "title": "Decision Pointer",
          "type": "string"
        },
        "decision_date": {
          "format": "date",
          "title": "Decision Date",
          "type": "string"
        },
        "scope": {
          "minLength": 1,
          "title": "Scope",
          "type": "string"
        },
        "decision_sha256": {
          "pattern": "^[a-f0-9]{64}$",
          "title": "Decision Sha256",
          "type": "string"
        }
      },
      "required": [
        "external_id",
        "decision_pointer",
        "decision_date",
        "scope",
        "decision_sha256"
      ],
      "title": "ApprovalReference",
      "type": "object"
    },
    "EvidenceBinding": {
      "additionalProperties": false,
      "properties": {
        "external_id": {
          "minLength": 1,
          "title": "External Id",
          "type": "string"
        },
        "source_reference_url": {
          "minLength": 1,
          "title": "Source Reference Url",
          "type": "string"
        },
        "source_record_date": {
          "format": "date",
          "title": "Source Record Date",
          "type": "string"
        },
        "receiver_content_hash": {
          "pattern": "^[a-f0-9]{16}$",
          "title": "Receiver Content Hash",
          "type": "string"
        },
        "normalized_entry_sha256": {
          "pattern": "^[a-f0-9]{64}$",
          "title": "Normalized Entry Sha256",
          "type": "string"
        },
        "hash_basis": {
          "const": "receiver-selected-fields-json-sort-keys-v1",
          "title": "Hash Basis",
          "type": "string"
        }
      },
      "required": [
        "external_id",
        "source_reference_url",
        "source_record_date",
        "receiver_content_hash",
        "normalized_entry_sha256",
        "hash_basis"
      ],
      "title": "EvidenceBinding",
      "type": "object"
    },
    "GraphEdge": {
      "additionalProperties": false,
      "properties": {
        "edge_id": {
          "pattern": "^[A-Z0-9_-]{3,100}$",
          "title": "Edge Id",
          "type": "string"
        },
        "source_id": {
          "pattern": "^[A-Z0-9_-]{3,100}$",
          "title": "Source Id",
          "type": "string"
        },
        "destination_id": {
          "pattern": "^[A-Z0-9_-]{3,100}$",
          "title": "Destination Id",
          "type": "string"
        },
        "relationship_predicate": {
          "enum": [
            "has_documented_responsibility",
            "documented_in",
            "accepted_through",
            "approves_specific_use",
            "placed_under",
            "is_informed_by"
          ],
          "title": "Relationship Predicate",
          "type": "string"
        },
        "evidence": {
          "$ref": "#/$defs/EvidenceBinding"
        },
        "review_status": {
          "enum": [
            "pending_review",
            "approved",
            "hold",
            "context_only"
          ],
          "title": "Review Status",
          "type": "string"
        },
        "approval": {
          "anyOf": [
            {
              "$ref": "#/$defs/ApprovalReference"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "approved_scope": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Approved Scope"
        },
        "interpretation_limitations": {
          "minLength": 20,
          "title": "Interpretation Limitations",
          "type": "string"
        },
        "approval_basis": {
          "enum": [
            "derived_from_scoped_owner_decision",
            "unreviewed"
          ],
          "title": "Approval Basis",
          "type": "string"
        }
      },
      "required": [
        "edge_id",
        "source_id",
        "destination_id",
        "relationship_predicate",
        "evidence",
        "review_status",
        "interpretation_limitations",
        "approval_basis"
      ],
      "title": "GraphEdge",
      "type": "object"
    },
    "GraphNode": {
      "additionalProperties": false,
      "properties": {
        "node_id": {
          "pattern": "^[A-Z0-9_-]{3,100}$",
          "title": "Node Id",
          "type": "string"
        },
        "node_type": {
          "enum": [
            "Role",
            "Responsibility",
            "Evidence_Record",
            "Review_Decision",
            "Research_Construct",
            "CV_Claim_Placement"
          ],
          "title": "Node Type",
          "type": "string"
        },
        "display_label": {
          "minLength": 1,
          "title": "Display Label",
          "type": "string"
        },
        "context_summary": {
          "minLength": 1,
          "title": "Context Summary",
          "type": "string"
        }
      },
      "required": [
        "node_id",
        "node_type",
        "display_label",
        "context_summary"
      ],
      "title": "GraphNode",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "map_identifier": {
      "const": "JW-CV-MAP-001",
      "default": "JW-CV-MAP-001",
      "title": "Map Identifier",
      "type": "string"
    },
    "map_version": {
      "const": "0.3.0",
      "default": "0.3.0",
      "title": "Map Version",
      "type": "string"
    },
    "nodes": {
      "items": {
        "$ref": "#/$defs/GraphNode"
      },
      "minItems": 1,
      "title": "Nodes",
      "type": "array"
    },
    "edges": {
      "items": {
        "$ref": "#/$defs/GraphEdge"
      },
      "minItems": 1,
      "title": "Edges",
      "type": "array"
    }
  },
  "required": [
    "nodes",
    "edges"
  ],
  "title": "KnowledgeEvidenceMap",
  "type": "object"
}
