Skip to content

Commit da7875e

Browse files
committed
Add request body details on the swagger docs
1 parent 804b5ec commit da7875e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

routes/tasks.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ router.get('/', tasksController.fetchTasks)
3636
* /tasks:
3737
* post:
3838
* summary: Used to create new task
39+
* requestBody:
40+
* description: Task data
41+
* content:
42+
* application/json:
43+
* schema:
44+
* $ref: '#/components/schemas/tasks'
3945
* responses:
4046
* 200:
4147
* description: returns newly created task
@@ -57,6 +63,12 @@ router.post('/', createTask, tasksController.addNewTask)
5763
* /tasks:
5864
* patch:
5965
* summary: Used to update task details
66+
* requestBody:
67+
* description: Task data to be updated
68+
* content:
69+
* application/json:
70+
* schema:
71+
* $ref: '#/components/schemas/tasks'
6072
* responses:
6173
* 204:
6274
* description: no content

0 commit comments

Comments
 (0)