{"openapi":"3.1.0","info":{"title":"學士班畢業資格管理與審查系統 API","version":"1.1.0"},"paths":{"/api/auth/config":{"get":{"summary":"Get Auth Config","description":"提供前端 Google OAuth 設定資訊與啟用狀態","operationId":"get_auth_config_api_auth_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/google":{"post":{"summary":"Google Login","description":"Google OAuth (GIS ID Token) 登入驗證端點\n僅有在 admin 白名單中的 Gmail 帳號可通過驗證並獲得 JWT Session","operationId":"google_login_api_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"summary":"Get Current User Profile","description":"取得當前已登入之管理員個人資料","operationId":"get_current_user_profile_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/logout":{"post":{"summary":"Logout","description":"管理員登出端點，清除 Session Cookie","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/whitelist":{"get":{"summary":"List Whitelist","description":"查詢所有在白名單中的管理員 Gmail 清單","operationId":"list_whitelist_api_admin_whitelist_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Add Whitelist Member","description":"新增 Gmail 至管理員白名單","operationId":"add_whitelist_member_api_admin_whitelist_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/whitelist/{email}":{"delete":{"summary":"Remove Whitelist Member","description":"自白名單中移除特定 Gmail 管理員","operationId":"remove_whitelist_member_api_admin_whitelist__email__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health":{"get":{"summary":"Health Check","description":"系統與資料庫健康檢查端點 (公開端點)","operationId":"health_check_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/rules":{"get":{"summary":"Get All Rules","description":"取得所有已儲存之系所與學年度門檻清單概要 (需登入管理員)","operationId":"get_all_rules_api_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Save Or Update Rule","description":"新增或更新系所畢業條件明細 (Upsert，需登入管理員)","operationId":"save_or_update_rule_api_rules_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/rules/{dept_code}/{year}":{"get":{"summary":"Get Rule By Dept And Year","description":"取得特定系所與學年度之完整畢業條件明細 (需登入管理員)","operationId":"get_rule_by_dept_and_year_api_rules__dept_code___year__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dept_code","in":"path","required":true,"schema":{"type":"string","title":"Dept Code"}},{"name":"year","in":"path","required":true,"schema":{"type":"string","title":"Year"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Rule","description":"刪除指定系所與學年度之門檻資料 (需登入管理員)","operationId":"delete_rule_api_rules__dept_code___year__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dept_code","in":"path","required":true,"schema":{"type":"string","title":"Dept Code"}},{"name":"year","in":"path","required":true,"schema":{"type":"string","title":"Year"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rules/batch":{"post":{"summary":"Batch Import Rules","description":"批次匯入多筆門檻資料（支援全系統 JSON 備份檔上傳，需登入管理員）","operationId":"batch_import_rules_api_rules_batch_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Backup Dict"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/rules/export":{"get":{"summary":"Export All Rules","description":"匯出 Neon 資料庫中全部門檻資料為備份 JSON 字典格式 (需登入管理員)","operationId":"export_all_rules_api_rules_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/":{"get":{"summary":"Serve Root","description":"服務主頁面 index.html","operationId":"serve_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}