{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openyacht.org/schemas/v1/tombstone.schema.json",
  "title": "OpenYacht Tombstone",
  "description": "Marker for a listing that became invisible to the requesting partner (withdrawn, sold, or unshared), delivered in /listings sync results and subscription pushes. The prose spec (spec/api-design.md) is normative; this schema is normative for JSON shape only — on any conflict the prose wins and this schema is defective.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uri",
      "pattern": "^https://[^/]+/openyacht/v1/listings/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "description": "The listing's canonical URI — unchanged for the life of the listing, tombstone included."
    },
    "tombstone": { "const": true },
    "status": { "enum": ["active", "under_offer", "sold", "withdrawn"] },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z$"
    }
  },
  "required": ["id", "tombstone", "status", "updated_at"],
  "patternProperties": { "^x_": true },
  "additionalProperties": false
}
