From 323b8c1425576675ff6b90e7018b6cb8b50ec31b Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Fri, 1 Oct 2021 12:02:32 +0200 Subject: [PATCH] Added new API endpoint Signed-off-by: Christian Wolf --- docs/dev/api/0.0.3/openapi-cookbook.yaml | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/dev/api/0.0.3/openapi-cookbook.yaml b/docs/dev/api/0.0.3/openapi-cookbook.yaml index 6d20c407..543ec3d0 100644 --- a/docs/dev/api/0.0.3/openapi-cookbook.yaml +++ b/docs/dev/api/0.0.3/openapi-cookbook.yaml @@ -298,6 +298,35 @@ paths: responses: 200: description: Image was obtained and will be inresponse either as image/jpeg or image/svg+xml + post: + tags: [ Recipes ] + summary: Upload the image for a given recipe. + parameters: + - in: path + name: id + description: The id of the recipe to alter + required: true + schema: + type: integer + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + imageFile: + type: string + format: binary + description: The image to be used as new image of the recipe + responses: + 204: + description: The image was sucessfully stored + 406: + description: The image could not be saved or parsed. + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /api/search/{query}: parameters: - in: path