{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nthu/main/json-schema/nthu-announcement-detail-schema.json",
  "title": "AnnouncementDetail",
  "description": "Announcement detail with articles list.",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/nthu-data-api.yaml#/components/schemas/AnnouncementDetail",
  "properties": {
    "title": {
      "type": "string",
      "title": "Title",
      "description": "佈告欄標題"
    },
    "link": {
      "type": "string",
      "maxLength": 2083,
      "minLength": 1,
      "format": "uri",
      "title": "Link",
      "description": "佈告欄連結"
    },
    "language": {
      "type": "string",
      "title": "Language",
      "description": "佈告欄語言"
    },
    "department": {
      "type": "string",
      "title": "Department",
      "description": "發布部門"
    },
    "articles": {
      "items": {
        "$ref": "#/$defs/AnnouncementArticle"
      },
      "type": "array",
      "title": "Articles",
      "description": "公告列表"
    }
  },
  "type": "object",
  "required": [
    "title",
    "link",
    "language",
    "department",
    "articles"
  ],
  "$defs": {
    "AnnouncementArticle": {
      "properties": {
        "title": {
          "title": "Title",
          "description": "公告標題",
          "type": [
            "string",
            "null"
          ]
        },
        "link": {
          "title": "Link",
          "description": "公告連結",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 2083,
          "minLength": 1,
          "format": "uri"
        },
        "date": {
          "title": "Date",
          "description": "公告日期 (YYYY-MM-DD)",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object",
      "required": [
        "title",
        "link"
      ],
      "title": "AnnouncementArticle",
      "description": "Individual announcement article."
    }
  }
}