Skip to content

Commit

Permalink
fix water\post.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Iryna-Pavlyk committed Aug 11, 2024
1 parent cf5d07d commit 1467375
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
20 changes: 19 additions & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}
}
Expand Down
15 changes: 14 additions & 1 deletion swagger/paths/water/post.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 1467375

Please sign in to comment.