Skip to content

Commit 08a194b

Browse files
committed
Some minor fixes in api annotations
1 parent 6c10e25 commit 08a194b

4 files changed

Lines changed: 28 additions & 26 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,5 @@ vite.config.js.timestamp-*
139139
vite.config.ts.timestamp-*
140140

141141
/src/generated/prisma
142+
143+
/doc

src/routes/achievements.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ export default function acheivementsRouter(upload: Multer, supabase: SupabaseCli
5353
* @apiName createAchievement
5454
* @apiGroup Achievement
5555
*
56-
* @apiParam (FormData) {File} image Image file
57-
* @apiParam (FormData) {String} achievementData JSON string of achievement fields:
56+
* @apiBody (FormData) {File} image Image file
57+
* @apiBody (FormData) {String} achievementData JSON string of achievement fields:
5858
* - title: string
5959
* - description: string
6060
* - achievedAt: Date
@@ -74,8 +74,8 @@ export default function acheivementsRouter(upload: Multer, supabase: SupabaseCli
7474
* @apiGroup Achievement
7575
*
7676
* @apiParam (Path Params) {Number} achievementId Achievement ID
77-
* @apiParam (FormData) {File} [image] Optional new image
78-
* @apiParam (FormData) {String} achievementData JSON string of updated fields:
77+
* @apiBody (FormData) {File} [image] Optional new image
78+
* @apiBody (FormData) {String} achievementData JSON string of updated fields:
7979
* - title?: string
8080
* - description?: string
8181
* - achievedAt?: Date

src/routes/interviews.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ export default function interviewRouter(upload: Multer, supabase: SupabaseClient
6262
* @apiGroup Interview
6363
*
6464
* @apiParam (Path Params) {UUID} memberId ID of the member sharing the interview
65-
* @apiParam (Request Body) {String} company Name of the company
66-
* @apiParam (Request Body) {String} role Role applied for
67-
* @apiParam (Request Body) {String="Selected","Rejected","Pending"} verdict Result of the interview
68-
* @apiParam (Request Body) {String} content Experience content
69-
* @apiParam (Request Body) {Boolean} isAnonymous Whether the post is anonymous
65+
* @apiBody (Request Body) {String} company Name of the company
66+
* @apiBody (Request Body) {String} role Role applied for
67+
* @apiBody (Request Body) {String="Selected","Rejected","Pending"} verdict Result of the interview
68+
* @apiBody (Request Body) {String} content Experience content
69+
* @apiBody (Request Body) {Boolean} isAnonymous Whether the post is anonymous
7070
*
7171
* @apiSuccess {Object} interview Created interview experience
7272
*
@@ -81,12 +81,12 @@ export default function interviewRouter(upload: Multer, supabase: SupabaseClient
8181
* @apiGroup Interview
8282
*
8383
* @apiParam (Path Params) {Number} id Interview ID to update
84-
* @apiParam (Request Body) {UUID} memberId Member ID of the owner
85-
* @apiParam (Request Body) {String} [company] Company name
86-
* @apiParam (Request Body) {String} [role] Role
87-
* @apiParam (Request Body) {String="Selected","Rejected","Pending"} [verdict] Interview result
88-
* @apiParam (Request Body) {String} [content] Experience content
89-
* @apiParam (Request Body) {Boolean} [isAnonymous] Anonymous flag
84+
* @apiBody (Request Body) {UUID} memberId Member ID of the owner
85+
* @apiBody (Request Body) {String} [company] Company name
86+
* @apiBody (Request Body) {String} [role] Role
87+
* @apiBody (Request Body) {String="Selected","Rejected","Pending"} [verdict] Interview result
88+
* @apiBody (Request Body) {String} [content] Experience content
89+
* @apiBody (Request Body) {Boolean} [isAnonymous] Anonymous flag
9090
*
9191
* @apiSuccess {Object} interview Updated interview experience
9292
*

src/routes/projects.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ export default function projectsRouter(
8888
* @apiName createProject
8989
* @apiGroup Project
9090
*
91-
* @apiParam (FormData) {String} name Name of the project
92-
* @apiParam (FormData) {File} image Image file for the project
93-
* @apiParam (FormData) {String} githubUrl GitHub URL of the project
94-
* @apiParam (FormData) {String} deployUrl Deployment link of the project
95-
* @apiParam (FormData) {UUID} AdminId ID of the admin creating the project
91+
* @apiBody (FormData) {String} name Name of the project
92+
* @apiBody (FormData) {File} image Image file for the project
93+
* @apiBody (FormData) {String} githubUrl GitHub URL of the project
94+
* @apiBody (FormData) {String} deployUrl Deployment link of the project
95+
* @apiBody (FormData) {UUID} AdminId ID of the admin creating the project
9696
*
9797
* @apiSuccess {Object} project The created project object
9898
*
@@ -109,11 +109,11 @@ export default function projectsRouter(
109109
* @apiGroup Project
110110
*
111111
* @apiParam (Path Params) {Number} projectId ID of the project to update
112-
* @apiParam (Body) {String} [name] Name of the project (optional)
113-
* @apiParam (Body) {String} [githubUrl] GitHub URL of the project (optional)
114-
* @apiParam (Body) {String} [deployUrl] Deployment link of the project (optional)
115-
* @apiParam (Body) {UUID} adminId ID of the admin updating the project (required)
116-
* @apiParam (Form Data) {File} [image] Image file (optional)
112+
* @apiBody (Body) {String} [name] Name of the project (optional)
113+
* @apiBody (Body) {String} [githubUrl] GitHub URL of the project (optional)
114+
* @apiBody (Body) {String} [deployUrl] Deployment link of the project (optional)
115+
* @apiBody (Body) {UUID} adminId ID of the admin updating the project (required)
116+
* @apiBody (Form Data) {File} [image] Image file (optional)
117117
*
118118
* @apiSuccess {Object} project Updated project data
119119
*
@@ -164,7 +164,7 @@ export default function projectsRouter(
164164
* @apiGroup MemberProject
165165
*
166166
* @apiParam (Path Params) {Number} projectId ID of the project
167-
* @apiParam (Request Body) {UUID[]} memberIds Array of member IDs to add to the project
167+
* @apiBody (Request Body) {UUID[]} memberIds Array of member IDs to add to the project
168168
*
169169
* @apiSuccess {Number} count Number of members successfully added
170170
*

0 commit comments

Comments
 (0)