Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
### Documentation
- Add documentation on updates of the API endpoints
[#1001](https://github.com/nextcloud/cookbook/pull/1001) @christianlupus
- Fix API specification in accordance with real implementation
[#1006](https://github.com/nextcloud/cookbook/pull/1006) @christianlupus

## 0.9.12 - 2022-05-12

Expand Down
46 changes: 45 additions & 1 deletion docs/dev/api/0.0.2/openapi-cookbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,50 @@ components:
description: The line where the exception is thrown
example: 223

RecipeStub:
type: object
description: A stub of a recipe with some basic information present
properties:
name:
type: string
description: The name of the recipe
example: Baked bananas
recipe_id:
type: integer
description: The index of the recipe
example: 1
keywords:
type: string
description: A comma-separated list of recipe keywords
example: sweets,fruit
dateCreated:
type: string
description: The date the recipe was created in the app
example: "2022-01-02T16:12:41+0000"
dateModified:
type: string
description: The date the recipe was modified lastly in the app
example: "2022-01-10T10:02:52+0000"
imageUrl:
type: string
description: The URL of the recipe image
example: http://example.com/path/to/image.jpg
imagePlaceholderUrl:
type: string
description: The URL of the placeholder of the recipe image
example: http://example.com/path/to/image_thumb.jpg
required:
- "name"
- "recipe_id"
- "imageUrl"
- "imagePlaceholderUrl"
- "dateCreated"

StubList:
type: array
items:
$ref: "#/components/schemas/RecipeStub"

securitySchemes:
app_password:
type: http
Expand Down Expand Up @@ -388,7 +432,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/RecipeList"
$ref: "#/components/schemas/StubList"
post:
tags: [ Recipes ]
summary: Create a new recipe
Expand Down
46 changes: 45 additions & 1 deletion docs/dev/api/0.0.3/openapi-cookbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,50 @@ components:
description: The line where the exception is thrown
example: 223

RecipeStub:
type: object
description: A stub of a recipe with some basic information present
properties:
name:
type: string
description: The name of the recipe
example: Baked bananas
recipe_id:
type: integer
description: The index of the recipe
example: 1
keywords:
type: string
description: A comma-separated list of recipe keywords
example: sweets,fruit
dateCreated:
type: string
description: The date the recipe was created in the app
example: "2022-01-02T16:12:41+0000"
dateModified:
type: string
description: The date the recipe was modified lastly in the app
example: "2022-01-10T10:02:52+0000"
imageUrl:
type: string
description: The URL of the recipe image
example: http://example.com/path/to/image.jpg
imagePlaceholderUrl:
type: string
description: The URL of the placeholder of the recipe image
example: http://example.com/path/to/image_thumb.jpg
required:
- "name"
- "recipe_id"
- "imageUrl"
- "imagePlaceholderUrl"
- "dateCreated"

StubList:
type: array
items:
$ref: "#/components/schemas/RecipeStub"

securitySchemes:
app_password:
type: http
Expand Down Expand Up @@ -399,7 +443,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/RecipeList"
$ref: "#/components/schemas/StubList"
post:
tags: [ Recipes ]
summary: Create a new recipe
Expand Down