-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcourse.json
More file actions
98 lines (98 loc) · 2.91 KB
/
course.json
File metadata and controls
98 lines (98 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{
"name": "Course",
"access": {
"anon": "Can browse course information.",
"user": "Can browse course information. Cannot modify course fact data.",
"admin": "Can browse course information. Does not directly modify course facts through ordinary pages.",
"agent": "Can read course search and detail capabilities."
},
"rules": {
"stable-entity": "A course is a stable course entity and does not represent a specific semester offering.",
"jwid-url-only": "jwId is used only for URLs, APIs, MCP, and backend logic; it should not be directly displayed in ordinary course UI."
},
"capabilities": {
"course-list": {
"title": "Course List & Filter",
"auth": "anon",
"links": {
"models": ["Course"],
"ui": ["List Table"]
},
"web": {
"pages": ["/courses"]
},
"rest": {
"routes": [
{
"path": "/api/courses",
"returns": "PaginatedResponse<Course>"
}
]
},
"mcp": {
"tools": [
{
"name": "search_courses",
"returns": "{ courses: Course[] }",
"rest_equivalent": "GET /api/courses"
}
]
},
"display": {
"fields": [
"course.code",
"course.namePrimary",
"course.nameSecondary (locale-dependent)",
"course.educationLevel.namePrimary",
"course.category.namePrimary",
"course.classType.namePrimary"
],
"filters": ["search", "educationLevelId", "categoryId", "classTypeId"]
}
},
"course-detail": {
"title": "Course Detail",
"auth": "anon",
"links": {
"models": ["Course"],
"ui": ["Detail Hero", "Context Tabs", "Basic Info Card"]
},
"web": {
"pages": ["/courses/[jwId]"]
},
"rest": {
"routes": [
{
"path": "/api/courses/[jwId]",
"returns": "CourseDetail"
}
]
},
"mcp": {
"tools": [
{
"name": "get_course_by_jw_id",
"returns": "{ found: Boolean, course: CourseDetail? }",
"rest_equivalent": "GET /api/courses/[jwId]"
}
]
},
"display": {
"fields": [
"course.namePrimary (h1 title)",
"course.nameSecondary (Locale-dependent subtitle)",
"course.code (Monospace badge)",
"course.educationLevel.namePrimary",
"course.category.namePrimary",
"course.classType.namePrimary",
"section.semester.nameCn (Semester column)",
"section.code (Section code badge)",
"section.teachers[].namePrimary + nameSecondary (Teachers)",
"section.campus.namePrimary (Campus)",
"section.stdCount / section.limitCount (Capacity)",
"description.content (Markdown-rendered via DescriptionLoader)"
]
}
}
}
}