From ccfe38e9637dcc6fb86b7a450ebc79aa81567cc7 Mon Sep 17 00:00:00 2001 From: Thomas Kuschan Date: Fri, 30 Jun 2023 09:33:53 +0200 Subject: [PATCH] API Docs: Add book_slug to Example Responses Remove the book attribute in responses because it is never returned by the API. Currently, Chapters Create does not return book_slug! (The example response is consistent with the inconsistent API behavior) --- dev/api/responses/chapters-create.json | 11 ----------- dev/api/responses/chapters-list.json | 6 ++++-- dev/api/responses/chapters-read.json | 7 +++++-- dev/api/responses/chapters-update.json | 11 +---------- dev/api/responses/pages-list.json | 9 ++++++--- 5 files changed, 16 insertions(+), 28 deletions(-) diff --git a/dev/api/responses/chapters-create.json b/dev/api/responses/chapters-create.json index aff2f4238..4dbc764b1 100644 --- a/dev/api/responses/chapters-create.json +++ b/dev/api/responses/chapters-create.json @@ -10,17 +10,6 @@ "owned_by": 1, "updated_at": "2020-05-22T22:59:55.000000Z", "created_at": "2020-05-22T22:59:55.000000Z", - "id": 74, - "book": { - "id": 1, - "name": "BookStack User Guide", - "slug": "bookstack-user-guide", - "description": "This is a general guide on using BookStack on a day-to-day basis.", - "created_at": "2019-05-05T21:48:46.000000Z", - "updated_at": "2019-12-11T20:57:31.000000Z", - "created_by": 1, - "updated_by": 1 - }, "tags": [ { "name": "Category", diff --git a/dev/api/responses/chapters-list.json b/dev/api/responses/chapters-list.json index dc6dde100..c3dc98b9c 100644 --- a/dev/api/responses/chapters-list.json +++ b/dev/api/responses/chapters-list.json @@ -11,7 +11,8 @@ "updated_at": "2019-09-28T11:24:23.000000Z", "created_by": 1, "updated_by": 1, - "owned_by": 1 + "owned_by": 1, + "book_slug": "example-book" }, { "id": 2, @@ -24,7 +25,8 @@ "updated_at": "2019-10-17T15:05:34.000000Z", "created_by": 3, "updated_by": 3, - "owned_by": 3 + "owned_by": 3, + "book_slug": "example-book" } ], "total": 40 diff --git a/dev/api/responses/chapters-read.json b/dev/api/responses/chapters-read.json index 7e629fee8..75c324a61 100644 --- a/dev/api/responses/chapters-read.json +++ b/dev/api/responses/chapters-read.json @@ -22,6 +22,7 @@ "name": "Admin", "slug": "admin" }, + "book_slug": "example-book", "tags": [ { "name": "Category", @@ -43,7 +44,8 @@ "updated_by": 1, "draft": false, "revision_count": 2, - "template": false + "template": false, + "book_slug": "example-book" }, { "id": 7, @@ -58,7 +60,8 @@ "updated_by": 3, "draft": false, "revision_count": 1, - "template": false + "template": false, + "book_slug": "example-book" } ] } \ No newline at end of file diff --git a/dev/api/responses/chapters-update.json b/dev/api/responses/chapters-update.json index b470249be..cc454d740 100644 --- a/dev/api/responses/chapters-update.json +++ b/dev/api/responses/chapters-update.json @@ -10,16 +10,7 @@ "created_by": 1, "updated_by": 1, "owned_by": 1, - "book": { - "id": 1, - "name": "BookStack User Guide", - "slug": "bookstack-user-guide", - "description": "This is a general guide on using BookStack on a day-to-day basis.", - "created_at": "2019-05-05T21:48:46.000000Z", - "updated_at": "2019-12-11T20:57:31.000000Z", - "created_by": 1, - "updated_by": 1 - }, + "book_slug": "bookstack-demo-site", "tags": [ { "name": "Category", diff --git a/dev/api/responses/pages-list.json b/dev/api/responses/pages-list.json index 2ff4aeb3a..2b465c978 100644 --- a/dev/api/responses/pages-list.json +++ b/dev/api/responses/pages-list.json @@ -13,7 +13,8 @@ "updated_at": "2020-07-04T15:50:58.000000Z", "created_by": 1, "updated_by": 1, - "owned_by": 1 + "owned_by": 1, + "book_slug": "example-book" }, { "id": 2, @@ -28,7 +29,8 @@ "updated_at": "2019-06-06T12:03:04.000000Z", "created_by": 1, "updated_by": 1, - "owned_by": 1 + "owned_by": 1, + "book_slug": "example-book" }, { "id": 3, @@ -43,7 +45,8 @@ "updated_at": "2019-12-18T21:56:52.000000Z", "created_by": 1, "updated_by": 1, - "owned_by": 1 + "owned_by": 1, + "book_slug": "example-book" } ], "total": 322