feat: zlepšení šablon, přidány osobní údaje a spánkový režim

This commit is contained in:
Ondřej Anděl
2026-09-15 14:16:42 +02:00
parent a5711f3e1e
commit 21b01528e9
51 changed files with 3739 additions and 504 deletions
+35
View File
@@ -0,0 +1,35 @@
post:
operationId: applyMealTemplate
summary: Založí jídlo ze šablony do zvoleného dne.
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id, date]
properties:
id:
description: Identifikátor šablony
type: string
date:
description: Den, do kterého se jídlo založí
type: string
format: date
mealType:
description: Chod. Bez něj se použije chod ze šablony, jinak oběd.
allOf:
- $ref: "../../schemas/_index.yml#/MealType"
responses:
"200":
description: Aktualizovaný přehled dne
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/DayOverview"
"400":
description: Neplatná data
"401":
description: Neautentizovaný uživatel
"404":
description: Šablona neexistuje
+26
View File
@@ -0,0 +1,26 @@
post:
operationId: deleteMealTemplate
summary: Smaže šablonu jídla.
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id]
properties:
id:
type: string
responses:
"200":
description: Aktualizovaný seznam šablon
content:
application/json:
schema:
type: array
items:
$ref: "../../schemas/_index.yml#/MealTemplate"
"400":
description: Neplatná data
"401":
description: Neautentizovaný uživatel
+33
View File
@@ -0,0 +1,33 @@
post:
operationId: createMealTemplateFromMeal
summary: Vytvoří šablonu jídla z existujícího záznamu v přehledu dne.
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id, date]
properties:
id:
description: Identifikátor jídla, ze kterého se šablona vytvoří
type: string
date:
description: Den, ve kterém jídlo je
type: string
format: date
responses:
"200":
description: Aktualizovaný seznam šablon
content:
application/json:
schema:
type: array
items:
$ref: "../../schemas/_index.yml#/MealTemplate"
"400":
description: Neplatná data
"401":
description: Neautentizovaný uživatel
"404":
description: Jídlo neexistuje
+14
View File
@@ -0,0 +1,14 @@
get:
operationId: getMealTemplates
summary: Vrátí šablony jídel přihlášeného uživatele.
responses:
"200":
description: Šablony seřazené podle názvu
content:
application/json:
schema:
type: array
items:
$ref: "../../schemas/_index.yml#/MealTemplate"
"401":
description: Neautentizovaný uživatel
+22
View File
@@ -0,0 +1,22 @@
post:
operationId: saveMealTemplate
summary: Založí novou šablonu jídla, nebo upraví existující.
requestBody:
required: true
content:
application/json:
schema:
$ref: "../../schemas/_index.yml#/MealTemplateInput"
responses:
"200":
description: Aktualizovaný seznam šablon
content:
application/json:
schema:
type: array
items:
$ref: "../../schemas/_index.yml#/MealTemplate"
"400":
description: Neplatná data
"401":
description: Neautentizovaný uživatel