{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "SimRESC Wachen-Beschreibung / station description",
  "description": "simresc-wache.json im Paketordner einer Scenery: welche Tore, Dolly und Alarmlicht eine Rettungswache hat. / simresc-wache.json in a scenery package folder: which doors, dolly and alarm light a rescue station has.",
  "type": "object",
  "required": ["format", "stations"],
  "properties": {
    "$schema": { "type": "string" },
    "format": { "const": 1 },
    "stations": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["lat", "lon"],
        "anyOf": [
          { "required": ["doors"], "properties": { "doors": { "minItems": 1 } } },
          { "required": ["dolly"], "properties": { "dolly": { "const": true } } },
          { "required": ["alarm_light"], "properties": { "alarm_light": { "const": true } } }
        ],
        "properties": {
          "name": { "type": "string", "maxLength": 60, "description": "Anzeigename im Tablet / name shown on the tablet" },
          "lat": { "type": "number", "minimum": -90, "maximum": 90, "description": "Mitte der Wache (Landeplatz/Halle) / centre of the station" },
          "lon": { "type": "number", "minimum": -180, "maximum": 180 },
          "radius_m": { "type": "number", "minimum": 50, "maximum": 2000, "default": 300, "description": "Umkreis, in dem das Tablet die Wache zeigt / radius in which the tablet shows the station" },
          "doors": {
            "type": "array",
            "maxItems": 9,
            "items": {
              "type": "object",
              "required": ["index"],
              "properties": {
                "index": { "type": "integer", "minimum": 1, "maximum": 9, "description": "Tor n = L:SCENERY_HANGAR_DOOR_n / door n = L:SCENERY_HANGAR_DOOR_n" },
                "name": { "type": "string", "maxLength": 30 }
              },
              "additionalProperties": false
            }
          },
          "dolly": { "type": "boolean", "default": false, "description": "L:SCENERY_HANGAR_DOLLY_1" },
          "alarm_light": { "type": "boolean", "default": false, "description": "L:Dispatch" }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
