@@ -16,8 +16,93 @@ const API_LIMITER_RULES: ApiLimiterEntry = {
16
16
17
17
notificationsRoute . use ( apiLimiter ( API_LIMITER_RULES , limitStorage ) ) ;
18
18
19
+ /**
20
+ * @openapi
21
+ *
22
+ * paths:
23
+ * /notifications/all:
24
+ * get:
25
+ * summary: Return all the notifications for the user
26
+ * responses:
27
+ * '200':
28
+ * description: Ok
29
+ * content:
30
+ * application/json:
31
+ * schema:
32
+ * allOf:
33
+ * - $ref: '#/components/schemas/CommonResponse'
34
+ * '400':
35
+ * description: Bad Request
36
+ * content:
37
+ * application/json:
38
+ * schema:
39
+ * allOf:
40
+ * - $ref: '#/components/schemas/BadRequestError'
41
+ *
42
+ * '429':
43
+ * description: Too many requests
44
+ * content:
45
+ * application/json:
46
+ * schema:
47
+ * allOf:
48
+ * - $ref: '#/components/schemas/TooManyRequestError'
49
+ * '500':
50
+ * description: Generic server error
51
+ * content:
52
+ * application/json:
53
+ * schema:
54
+ * allOf:
55
+ * - $ref: '#/components/schemas/InternalServerError'
56
+ *
57
+ */
19
58
notificationsRoute . get ( "/all" , authenticationHandler , getAllNotifications ) ;
20
59
60
+ /**
61
+ * @openapi
62
+ *
63
+ * paths:
64
+ * /notifications/{notificationId}:
65
+ * put:
66
+ * summary: Mark a notification as read
67
+ * parameters:
68
+ * - name: notificationId
69
+ * in: path
70
+ * description: The id of the notification to mark as read
71
+ * required: true
72
+ * schema:
73
+ * type: string
74
+ * responses:
75
+ * '201':
76
+ * description: Created
77
+ * content:
78
+ * application/json:
79
+ * schema:
80
+ * allOf:
81
+ * - $ref: '#/components/schemas/CommonResponse'
82
+ * '400':
83
+ * description: Bad Request
84
+ * content:
85
+ * application/json:
86
+ * schema:
87
+ * allOf:
88
+ * - $ref: '#/components/schemas/BadRequestError'
89
+ *
90
+ * '429':
91
+ * description: Too many requests
92
+ * content:
93
+ * application/json:
94
+ * schema:
95
+ * allOf:
96
+ * - $ref: '#/components/schemas/TooManyRequestError'
97
+ * '500':
98
+ * description: Generic server error
99
+ * content:
100
+ * application/json:
101
+ * schema:
102
+ * allOf:
103
+ * - $ref: '#/components/schemas/InternalServerError'
104
+ *
105
+ */
21
106
notificationsRoute . put ( "/:notificationId" , authenticationHandler , readNotification ) ;
22
107
23
108
export default notificationsRoute ;
0 commit comments