forked from nevash-gobin/myAdvisorDev
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathopenapi.yaml
More file actions
104 lines (104 loc) · 2.38 KB
/
Copy pathopenapi.yaml
File metadata and controls
104 lines (104 loc) · 2.38 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
99
100
101
102
103
104
openapi: 3.0.3
info:
title: myAdvisor API
version: 1.0.0
description: |
Stub OpenAPI for the myAdvisor Express API.
Auth: send JWT in header `token` after `POST /accounts/login`.
Full UI contract: docs/API.md
servers:
- url: http://localhost:3002
description: Local development
paths:
/health/live:
get:
summary: Liveness probe
responses:
'200':
description: Process is up
/health/ready:
get:
summary: Readiness probe (DB ping)
responses:
'200':
description: Database reachable
'503':
description: Database unavailable
/health:
get:
summary: Status page / JSON health
parameters:
- in: query
name: format
schema:
type: string
enum: [json]
responses:
'200':
description: Healthy
'503':
description: Degraded
/accounts/login:
post:
summary: Student or staff login
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [username, password]
properties:
username:
type: string
password:
type: string
responses:
'200':
description: JWT + profile
'400':
description: Validation error
'401':
description: Invalid credentials
/student/{studentId}/eligibleCourses/{semesterId}:
get:
summary: Eligible courses for semester
security:
- TokenHeader: []
parameters:
- in: path
name: studentId
required: true
schema:
type: string
- in: path
name: semesterId
required: true
schema:
type: integer
responses:
'200':
description: Eligible course list
/admin/students:
get:
summary: List students (staff)
security:
- TokenHeader: []
parameters:
- in: query
name: page
schema:
type: integer
- in: query
name: limit
schema:
type: integer
responses:
'200':
description: Student list
components:
securitySchemes:
TokenHeader:
type: apiKey
in: header
name: token