diff --git a/CHANGELOG.md b/CHANGELOG.md index 243ff0722..d810f9fda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ [#936](https://github.com/nextcloud/cookbook/pull/947) @zorglubu - Updated French translation [#957](https://github.com/nextcloud/cookbook/pull/957) @zorglubu +- Add example to OpenAPI specification + [#957](https://github.com/nextcloud/cookbook/pull/972) @christianlupus ## 0.9.11 - 2022-03-28 diff --git a/docs/dev/api/0.0.2/openapi-cookbook.yaml b/docs/dev/api/0.0.2/openapi-cookbook.yaml index b5300c47b..0e7115394 100644 --- a/docs/dev/api/0.0.2/openapi-cookbook.yaml +++ b/docs/dev/api/0.0.2/openapi-cookbook.yaml @@ -392,7 +392,29 @@ paths: post: tags: [ Recipes ] summary: Create a new recipe - #requestBody: + requestBody: + description: | + A JSON representation of the recipe to be saved. + + See also the structure at https://schema.org/Recipe + content: + application/json: + schema: + type: object + properties: + name: + type: string + required: [ "name" ] + additionalProperties: true + example: + name: "Chips" + description: "A very delicious way of getting kids quiet" + ingredients: + - "1 pack of pre-fried chips" + tools: ["common oven"] + instructions: + - "Put the chips in the oven" + - "Wait until the are due" responses: 200: description: Successfully created new recipe