{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fastcrw-com/json-schema/fastcrw-com-change-tracking-diff-request-schema.json",
  "title": "ChangeTrackingDiffRequest",
  "description": "Single body (provide 'current') OR batch (provide 'batch'). Top-level modes/schema/prompt/contentType act as shared defaults in batch mode.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fastcrw-com-change-tracking-api-openapi.yml#/components/schemas/ChangeTrackingDiffRequest",
  "type": "object",
  "properties": {
    "batch": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ChangeTrackingDiffItem"
      }
    },
    "current": {
      "type": "object",
      "properties": {
        "markdown": {
          "type": "string"
        },
        "json": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "previous": {
      "$ref": "#/$defs/ChangeTrackingSnapshot"
    },
    "modes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "gitDiff",
          "json"
        ]
      }
    },
    "schema": {
      "type": "object",
      "additionalProperties": true
    },
    "prompt": {
      "type": "string"
    },
    "contentType": {
      "type": "string"
    }
  },
  "$defs": {
    "ChangeTrackingDiffItem": {
      "type": "object",
      "required": [
        "current"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "current": {
          "type": "object",
          "properties": {
            "markdown": {
              "type": "string"
            },
            "json": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "previous": {
          "$ref": "#/$defs/ChangeTrackingSnapshot"
        },
        "modes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "gitDiff",
              "json"
            ]
          }
        },
        "schema": {
          "type": "object",
          "additionalProperties": true
        },
        "prompt": {
          "type": "string"
        },
        "contentType": {
          "type": "string"
        },
        "tag": {
          "type": "string"
        }
      }
    },
    "ChangeTrackingSnapshot": {
      "type": "object",
      "properties": {
        "markdown": {
          "type": "string",
          "description": "Present for gitDiff/mixed mode"
        },
        "json": {
          "type": "object",
          "additionalProperties": true,
          "description": "Present for json/mixed mode"
        },
        "contentHash": {
          "type": "string",
          "description": "Mode-aware hash; persist + supply on the next check"
        },
        "capturedAt": {
          "type": "string",
          "description": "Caller-stamped capture time, echoed untouched"
        }
      }
    }
  }
}