{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "example-briefing.schema.json",
  "title": "Attendit example briefing",
  "description": "The contract for example-briefing.json. The site renders the German page, the English page and the file for agents from one file in this shape. Every quote must be verbatim from the tender document, with its section and page.",
  "type": "object",
  "required": ["example", "notice", "disclaimer", "package", "required_documents", "deadlines", "award_criteria", "thresholds", "not_proven"],
  "properties": {
    "example": {"type": "boolean", "description": "true = invented content. false = based on a real tender (then 'notice' must say which kind of sample it is, and usage rights must be cleared)."},
    "badge": {"$ref": "#/$defs/text", "description": "Optional label next to the title. Default: Beispiel / Example. A real sample can say Muster / Sample."},
    "notice": {"$ref": "#/$defs/text", "description": "The banner at the top. Says what the reader is looking at."},
    "disclaimer": {"$ref": "#/$defs/text"},
    "package": {"type": "array", "minItems": 1, "items": {"type": "object", "required": ["id", "label", "value", "source"],
      "properties": {"id": {"type": "string"}, "label": {"$ref": "#/$defs/text"}, "value": {"$ref": "#/$defs/text"}, "source": {"$ref": "#/$defs/source"}}}},
    "required_documents": {"type": "array", "minItems": 1, "items": {"type": "object", "required": ["id", "title", "quote_de", "source", "when"],
      "properties": {"id": {"type": "string"}, "title": {"$ref": "#/$defs/text"}, "quote_de": {"type": "string", "description": "Verbatim from the tender document."},
        "translation_en": {"type": "string", "description": "Optional. Without it the English page shows the German quote only."},
        "source": {"$ref": "#/$defs/source"}, "when": {"$ref": "#/$defs/text", "description": "For example: with the bid, or on request."}}}},
    "deadlines": {"type": "array", "minItems": 1, "items": {"type": "object", "required": ["id", "title", "when", "quote_de", "source"],
      "properties": {"id": {"type": "string"}, "title": {"$ref": "#/$defs/text"}, "when": {"$ref": "#/$defs/text"}, "quote_de": {"type": "string"},
        "iso": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2})?$", "description": "Optional. Local time in Europe/Vienna, like 2027-03-12T10:00. Deadlines with an iso value go into the calendar file."},
        "translation_en": {"type": "string"}, "source": {"$ref": "#/$defs/source"}}}},
    "award_criteria": {"type": "array", "minItems": 1, "description": "Weights must add up to 100.", "items": {"type": "object", "required": ["id", "name", "weight_percent", "quote_de", "source"],
      "properties": {"id": {"type": "string"}, "name": {"$ref": "#/$defs/text"}, "weight_percent": {"type": "number", "minimum": 0, "maximum": 100},
        "quote_de": {"type": "string"}, "translation_en": {"type": "string"}, "source": {"$ref": "#/$defs/source"}}}},
    "thresholds": {"type": "array", "description": "May be empty.", "items": {"type": "object", "required": ["id", "name", "value", "quote_de", "source"],
      "properties": {"id": {"type": "string"}, "name": {"$ref": "#/$defs/text"}, "value": {"$ref": "#/$defs/text"}, "quote_de": {"type": "string"},
        "translation_en": {"type": "string"}, "source": {"$ref": "#/$defs/source"}}}},
    "not_proven": {"type": "array", "description": "Topics the briefing could not find in the documents. May be empty. Showing one is a trust signal.", "items": {"type": "object", "required": ["id", "topic", "note"],
      "properties": {"id": {"type": "string"}, "topic": {"$ref": "#/$defs/text"}, "note": {"$ref": "#/$defs/text"}}}}
  },
  "$defs": {
    "text": {"type": "object", "required": ["de", "en"], "properties": {"de": {"type": "string"}, "en": {"type": "string"}}},
    "source": {"type": "object", "required": ["section", "page"], "properties": {"section": {"$ref": "#/$defs/text"}, "page": {"type": "integer", "minimum": 1}}}
  }
}
