{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nthu/main/json-schema/nthu-course-data-schema.json",
  "title": "CourseData",
  "description": "Course data schema.",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/nthu-data-api.yaml#/components/schemas/CourseData",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "課號"
    },
    "chinese_title": {
      "type": "string",
      "title": "Chinese Title",
      "description": "課程中文名稱"
    },
    "english_title": {
      "type": "string",
      "title": "English Title",
      "description": "課程英文名稱"
    },
    "credit": {
      "type": "string",
      "title": "Credit",
      "description": "學分數"
    },
    "size_limit": {
      "type": "string",
      "title": "Size Limit",
      "description": "人限"
    },
    "freshman_reservation": {
      "type": "string",
      "title": "Freshman Reservation",
      "description": "新生保留人數"
    },
    "object": {
      "type": "string",
      "title": "Object",
      "description": "通識對象"
    },
    "ge_type": {
      "type": "string",
      "title": "Ge Type",
      "description": "通識類別"
    },
    "language": {
      "$ref": "#/$defs/CourseLanguage",
      "description": "授課語言"
    },
    "note": {
      "type": "string",
      "title": "Note",
      "description": "備註"
    },
    "suspend": {
      "type": "string",
      "title": "Suspend",
      "description": "停開註記"
    },
    "class_room_and_time": {
      "type": "string",
      "title": "Class Room And Time",
      "description": "教室與上課時間"
    },
    "teacher": {
      "type": "string",
      "title": "Teacher",
      "description": "授課教師"
    },
    "prerequisite": {
      "type": "string",
      "title": "Prerequisite",
      "description": "擋修說明"
    },
    "limit_note": {
      "type": "string",
      "title": "Limit Note",
      "description": "課程限制說明"
    },
    "expertise": {
      "type": "string",
      "title": "Expertise",
      "description": "第一二專長對應"
    },
    "program": {
      "type": "string",
      "title": "Program",
      "description": "學分學程對應"
    },
    "no_extra_selection": {
      "type": "string",
      "title": "No Extra Selection",
      "description": "不可加簽說明"
    },
    "required_optional_note": {
      "type": "string",
      "title": "Required Optional Note",
      "description": "必選修說明"
    }
  },
  "type": "object",
  "required": [
    "id",
    "chinese_title",
    "english_title",
    "credit",
    "size_limit",
    "freshman_reservation",
    "object",
    "ge_type",
    "language",
    "note",
    "suspend",
    "class_room_and_time",
    "teacher",
    "prerequisite",
    "limit_note",
    "expertise",
    "program",
    "no_extra_selection",
    "required_optional_note"
  ],
  "$defs": {
    "CourseLanguage": {
      "type": "string",
      "enum": [
        "中",
        "英"
      ],
      "title": "CourseLanguage",
      "description": "Course language options."
    }
  }
}