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)
This commit is contained in:
Thomas Kuschan
2023-06-30 09:33:53 +02:00
parent 23ae332c1b
commit ccfe38e963
5 changed files with 16 additions and 28 deletions

View File

@ -10,17 +10,6 @@
"owned_by": 1, "owned_by": 1,
"updated_at": "2020-05-22T22:59:55.000000Z", "updated_at": "2020-05-22T22:59:55.000000Z",
"created_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": [ "tags": [
{ {
"name": "Category", "name": "Category",

View File

@ -11,7 +11,8 @@
"updated_at": "2019-09-28T11:24:23.000000Z", "updated_at": "2019-09-28T11:24:23.000000Z",
"created_by": 1, "created_by": 1,
"updated_by": 1, "updated_by": 1,
"owned_by": 1 "owned_by": 1,
"book_slug": "example-book"
}, },
{ {
"id": 2, "id": 2,
@ -24,7 +25,8 @@
"updated_at": "2019-10-17T15:05:34.000000Z", "updated_at": "2019-10-17T15:05:34.000000Z",
"created_by": 3, "created_by": 3,
"updated_by": 3, "updated_by": 3,
"owned_by": 3 "owned_by": 3,
"book_slug": "example-book"
} }
], ],
"total": 40 "total": 40

View File

@ -22,6 +22,7 @@
"name": "Admin", "name": "Admin",
"slug": "admin" "slug": "admin"
}, },
"book_slug": "example-book",
"tags": [ "tags": [
{ {
"name": "Category", "name": "Category",
@ -43,7 +44,8 @@
"updated_by": 1, "updated_by": 1,
"draft": false, "draft": false,
"revision_count": 2, "revision_count": 2,
"template": false "template": false,
"book_slug": "example-book"
}, },
{ {
"id": 7, "id": 7,
@ -58,7 +60,8 @@
"updated_by": 3, "updated_by": 3,
"draft": false, "draft": false,
"revision_count": 1, "revision_count": 1,
"template": false "template": false,
"book_slug": "example-book"
} }
] ]
} }

View File

@ -10,16 +10,7 @@
"created_by": 1, "created_by": 1,
"updated_by": 1, "updated_by": 1,
"owned_by": 1, "owned_by": 1,
"book": { "book_slug": "bookstack-demo-site",
"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": [ "tags": [
{ {
"name": "Category", "name": "Category",

View File

@ -13,7 +13,8 @@
"updated_at": "2020-07-04T15:50:58.000000Z", "updated_at": "2020-07-04T15:50:58.000000Z",
"created_by": 1, "created_by": 1,
"updated_by": 1, "updated_by": 1,
"owned_by": 1 "owned_by": 1,
"book_slug": "example-book"
}, },
{ {
"id": 2, "id": 2,
@ -28,7 +29,8 @@
"updated_at": "2019-06-06T12:03:04.000000Z", "updated_at": "2019-06-06T12:03:04.000000Z",
"created_by": 1, "created_by": 1,
"updated_by": 1, "updated_by": 1,
"owned_by": 1 "owned_by": 1,
"book_slug": "example-book"
}, },
{ {
"id": 3, "id": 3,
@ -43,7 +45,8 @@
"updated_at": "2019-12-18T21:56:52.000000Z", "updated_at": "2019-12-18T21:56:52.000000Z",
"created_by": 1, "created_by": 1,
"updated_by": 1, "updated_by": 1,
"owned_by": 1 "owned_by": 1,
"book_slug": "example-book"
} }
], ],
"total": 322 "total": 322