From 1467375c112f569d68402e558ae9213b59aca871 Mon Sep 17 00:00:00 2001 From: Iryna-Pavlyk <145845654+Iryna-Pavlyk@users.noreply.github.com> Date: Sun, 11 Aug 2024 20:51:40 +0300 Subject: [PATCH] fix water\post.yaml --- docs/swagger.json | 20 +++++++++++++++++++- swagger/paths/water/post.yaml | 15 ++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/docs/swagger.json b/docs/swagger.json index c4a02b6..d7f132c 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -93,7 +93,25 @@ }, "data": { "type": "object", - "$ref": "#/components/schemas/water" + "required": [ + "date", + "updatedDailyProgress", + "water" + ], + "properties": { + "date": { + "type": "string", + "example": "2024-08-03" + }, + "updatedDailyProgress": { + "type": "number", + "example": 50 + }, + "water": { + "type": "object", + "$ref": "#/components/schemas/water" + } + } } } } diff --git a/swagger/paths/water/post.yaml b/swagger/paths/water/post.yaml index 5f80d56..20394c8 100644 --- a/swagger/paths/water/post.yaml +++ b/swagger/paths/water/post.yaml @@ -44,7 +44,20 @@ responses: example: Successfully created a water! data: type: object - $ref: ../../components/schemas/water.yaml + required: + - date + - updatedDailyProgress + - water + properties: + date: + type: string + example: '2024-08-03' + updatedDailyProgress: + type: number + example: 50 + water: + type: object + $ref: '../../components/schemas/water.yaml' '400': $ref: ..\..\components\responses\400.yaml '401':