{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/neruva-io/json-schema/neruva-io-kgreplace-fact-request-schema.json",
  "title": "KGReplaceFactRequest",
  "description": "Atomic 'this fact changed' op: delete (s, r, old_object) + add\n(s, r, new_object) in one call. Zep-style fact invalidation: when\n'Alice works at Acme' becomes 'Alice works at Beta', the older\nbinding gets cleanly subtracted and the new one bound.\n\nold_object: optional. If omitted, queries current state and uses\nwhatever's bound. If provided, must match current state (409 if\nnot -- prevents accidental overwrite of a value the caller didn't\nexpect).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/neruva-io-hd-native-api-openapi.yml#/components/schemas/KGReplaceFactRequest",
  "properties": {
    "subject": {
      "type": "string",
      "title": "Subject"
    },
    "relation": {
      "type": "string",
      "title": "Relation"
    },
    "new_object": {
      "type": "string",
      "title": "New Object"
    },
    "old_object": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Old Object"
    }
  },
  "type": "object",
  "required": [
    "subject",
    "relation",
    "new_object"
  ]
}