fix: recepty přesnuty k jídlům
feat: přidána podpora fotek
This commit is contained in:
1 parent
efed5e6e86
commit
e13f7ce8e5
39 files changed
+1266
-511
No files matched your search
@@ -0,0 +1,34 @@
|
||||
post:
|
||||
operationId: addMealPhoto
|
||||
summary: Přidá fotku k jídlu (názvu a zdroji, ne ke dni).
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [name, image, thumbnail]
|
||||
properties:
|
||||
name:
|
||||
description: Název jídla
|
||||
type: string
|
||||
source:
|
||||
description: Zdroj jídla; bez něj jde o jídlo bez zdroje
|
||||
type: string
|
||||
image:
|
||||
description: Zmenšená fotka jako data URL
|
||||
type: string
|
||||
thumbnail:
|
||||
description: Náhled do seznamu jídel jako data URL
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: Uložená fotka
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../schemas/_index.yml#/MealPhoto"
|
||||
"400":
|
||||
description: Neplatná data nebo příliš mnoho fotek
|
||||
"401":
|
||||
description: Neautentizovaný uživatel
|
||||
@@ -0,0 +1,23 @@
|
||||
post:
|
||||
operationId: deleteMealPhoto
|
||||
summary: Smaže fotku jídla.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [id]
|
||||
properties:
|
||||
id:
|
||||
description: Identifikátor fotky
|
||||
type: string
|
||||
responses:
|
||||
"204":
|
||||
description: Fotka smazána
|
||||
"400":
|
||||
description: Neplatná data
|
||||
"401":
|
||||
description: Neautentizovaný uživatel
|
||||
"404":
|
||||
description: Fotka neexistuje
|
||||
@@ -0,0 +1,29 @@
|
||||
get:
|
||||
operationId: getMealPhotos
|
||||
summary: Vrátí fotky jídla i s plnými obrázky, od nejstarší.
|
||||
parameters:
|
||||
- in: query
|
||||
name: name
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Název jídla
|
||||
- in: query
|
||||
name: source
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Zdroj jídla; bez něj jde o jídlo bez zdroje
|
||||
responses:
|
||||
"200":
|
||||
description: Fotky jídla
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "../../schemas/_index.yml#/MealPhoto"
|
||||
"400":
|
||||
description: Neplatná data
|
||||
"401":
|
||||
description: Neautentizovaný uživatel
|
||||
Reference in new issue
Block a user