{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nthu/main/json-schema/nthu-bus-schedule-schema.json",
  "title": "BusSchedule",
  "description": "Unified bus schedule entry for both Main and Nanda campus.",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/nthu-data-api.yaml#/components/schemas/BusSchedule",
  "properties": {
    "time": {
      "type": "string",
      "title": "Time",
      "description": "發車時間"
    },
    "description": {
      "type": "string",
      "title": "Description",
      "description": "備註"
    },
    "dep_stop": {
      "type": "string",
      "title": "Dep Stop",
      "description": "發車地點"
    },
    "line": {
      "type": "string",
      "title": "Line",
      "description": "路線 (主校區: red/green, 南大: route_1/route_2)",
      "default": ""
    },
    "bus_type": {
      "$ref": "#/$defs/BusType",
      "description": "營運車輛類型"
    }
  },
  "type": "object",
  "required": [
    "time",
    "description",
    "dep_stop",
    "bus_type"
  ],
  "$defs": {
    "BusType": {
      "type": "string",
      "enum": [
        "route_83",
        "large-sized_bus",
        "middle-sized_bus"
      ],
      "title": "BusType",
      "description": "Bus vehicle type."
    }
  }
}