{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bund-dev/json-schema/bund-dev-closure-schema.json",
  "title": "Closure",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bund-dev-autobahn-openapi.yml#/components/schemas/Closure",
  "allOf": [
    {
      "$ref": "#/$defs/RoadEvent"
    }
  ],
  "$defs": {
    "Coordinate": {
      "type": "object",
      "description": "Beginn des betroffenen Streckenabschnitts (Koordinaten in WGS84). Identisch zu Point, jedoch sind rundungsbedingte Abweichungen möglich.",
      "properties": {
        "lat": {
          "$ref": "#/$defs/LatLongValue"
        },
        "long": {
          "$ref": "#/$defs/LatLongValue"
        }
      }
    },
    "DisplayType": {
      "type": "string",
      "enum": [
        "ROADWORKS",
        "WEBCAM",
        "PARKING",
        "WARNING",
        "WEIGHT_LIMIT_35",
        "CLOSURE",
        "CLOSURE_ENTRY_EXIT",
        "STRONG_ELECTRIC_CHARGING_STATION",
        "SHORT_TERM_ROADWORKS",
        "ELECTRIC_CHARGING_STATION"
      ]
    },
    "Extent": {
      "type": "string",
      "pattern": "-?\\d+(?:\\.\\d+)?,\\s*-?\\d+(?:\\.\\d+)?,\\s*-?\\d+(?:\\.\\d+)?,\\s*-?\\d+(?:\\.\\d+)?",
      "description": "Rechteck (in WGS84-Koordinaten), das den betroffenen Streckenabschnitt umschließt."
    },
    "IconRef": {
      "type": "string",
      "description": "Sinnbild, das die Art des Eintrags beschreibt. Größtenteils sind diese dem offiziellen Verkehrszeichenkatalog entnommen, teilweise allerdings mit abweichender Bedeutung und/oder nicht offiziellen Unternummern. Wo kein passendes Verkehrszeichen existiert, werden nicht-numerische Werte verwendet:\n<ul>\n<li>101: Gefahr</li>\n<li>123: Bauarbeiten</li>\n<li>250: Sperrung</li>\n<li>262-2: Max. 3,5t</li>\n<li>314-50: Park-/Rastplatz (Pkw/Lkw)</li>\n<li>314-50-2: Park-/Rastplatz (nur Pkw)</li>\n<li>448: Anschlussstelle gesperrt</li>\n<li>charging_plug_strong: Schnellladestation für E-Fahrzeuge</li>\n<li>warnkegel: Kurzzeitbaustelle</li>\n</ul>\n"
    },
    "Identifier": {
      "type": "string",
      "format": "byte"
    },
    "LatLongValue": {
      "type": "string",
      "pattern": "-?\\d+(?:\\.\\d+)?"
    },
    "LorryParkingFeatureIcon": {
      "type": "object",
      "properties": {
        "icon": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "style": {
          "type": "string"
        }
      }
    },
    "MultilineText": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "Point": {
      "type": "string",
      "pattern": "-?\\d+(?:\\.\\d+)?,\\s*-?\\d+(?:\\.\\d+)?",
      "description": "Beginn des betroffenen Streckenabschnitts (Längengrad und Breitengrad in WGS84). Identisch zu Coordinate, jedoch sind rundungsbedingte Abweichungen möglich."
    },
    "RoadEvent": {
      "allOf": [
        {
          "$ref": "#/$defs/RoadItem"
        },
        {
          "type": "object",
          "properties": {
            "startTimestamp": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      ]
    },
    "RoadItem": {
      "type": "object",
      "properties": {
        "extent": {
          "$ref": "#/$defs/Extent"
        },
        "identifier": {
          "$ref": "#/$defs/Identifier"
        },
        "routeRecommendation": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "coordinate": {
          "$ref": "#/$defs/Coordinate"
        },
        "footer": {
          "$ref": "#/$defs/MultilineText"
        },
        "icon": {
          "$ref": "#/$defs/IconRef"
        },
        "isBlocked": {
          "type": "string"
        },
        "description": {
          "$ref": "#/$defs/MultilineText"
        },
        "title": {
          "type": "string"
        },
        "point": {
          "$ref": "#/$defs/Point"
        },
        "display_type": {
          "$ref": "#/$defs/DisplayType"
        },
        "lorryParkingFeatureIcons": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LorryParkingFeatureIcon"
          }
        },
        "future": {
          "type": "boolean"
        },
        "subtitle": {
          "type": "string"
        }
      }
    }
  }
}