{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://landscapearchive.org/schemas/orbits/tla-sub.required.schema.json",
  "title": "TLA-Sub required-keys smoke (Draft — not normative)",
  "description": "Required-key + enum smoke for la.archive.substitution.v1 golden examples. Not a full normative schema; not Archive Seal.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema_id",
    "schema_version",
    "pack_id",
    "created_at",
    "substitution",
    "equivalency",
    "phase",
    "tla185_refs"
  ],
  "properties": {
    "schema_id": { "const": "la.archive.substitution.v1" },
    "schema_version": { "type": "integer", "const": 1 },
    "pack_id": { "type": "string", "minLength": 1 },
    "created_at": { "type": "string", "minLength": 1 },
    "substitution": {
      "type": "object",
      "required": ["original_ref", "substitute_ref"],
      "properties": {
        "original_ref": { "type": "string", "minLength": 1 },
        "substitute_ref": { "type": "string", "minLength": 1 }
      }
    },
    "equivalency": {
      "type": "object",
      "required": ["basis", "confidence"],
      "properties": {
        "basis": {
          "type": "string",
          "enum": ["botanical", "functional", "aesthetic", "cost", "availability", "other"]
        },
        "confidence": {
          "type": "string",
          "enum": ["documented", "partial", "asserted", "unknown"]
        }
      }
    },
    "phase": {
      "type": "string",
      "enum": ["design", "tender", "construction", "maintenance", "as_built", "other"]
    },
    "tla185_refs": { "type": "object" }
  }
}
