From ccd19135ed442ce79581d4fe376ea53a8a807437 Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 15 Nov 2021 15:58:34 +0100 Subject: [PATCH] add habit post --- drf-initiation/habits-tracker.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drf-initiation/habits-tracker.yml b/drf-initiation/habits-tracker.yml index 4de8c3d..1aa80d5 100644 --- a/drf-initiation/habits-tracker.yml +++ b/drf-initiation/habits-tracker.yml @@ -157,6 +157,24 @@ paths: 401: description: Unauthorized content: {} + post: + summary: New habit + description: Add new habit + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Habit' + responses: + 201: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Habit' + 401: + description: Unauthorized + content: {} /habits/{habit_id}/done/: parameters: