{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/seenrelay-com/json-schema/seenrelay-com-check-request-schema.json",
  "title": "CheckRequest",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/seenrelay-com-openapi.json#/components/schemas/CheckRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "fact",
    "known_value"
  ],
  "properties": {
    "fact": {
      "$ref": "#/$defs/FactDescriptor"
    },
    "known_value": {},
    "max_age_seconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 604800,
      "default": 3600
    }
  },
  "$defs": {
    "FactDescriptor": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "subject",
        "predicate",
        "source"
      ],
      "properties": {
        "subject": {
          "type": "string",
          "maxLength": 256,
          "description": "Human-readable label. Excluded from canonical fact identity."
        },
        "predicate": {
          "type": "string",
          "maxLength": 128,
          "description": "Stable shared machine identifier. Used as the identity discriminator when locator is absent."
        },
        "qualifiers": {
          "type": "object",
          "additionalProperties": true,
          "description": "Minimal semantic qualifiers needed to distinguish otherwise identical source-backed facts."
        },
        "source": {
          "type": "string",
          "format": "uri",
          "pattern": "^https?://"
        },
        "locator": {
          "$ref": "#/$defs/FactLocator"
        }
      }
    },
    "FactLocator": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "scheme",
        "value"
      ],
      "properties": {
        "scheme": {
          "enum": [
            "json_pointer",
            "element_id",
            "source_key"
          ]
        },
        "value": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024
        }
      }
    }
  }
}