Skip to content

Commit ccfe38e

Browse files
committed
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)
1 parent 23ae332 commit ccfe38e

File tree

5 files changed

+16
-28
lines changed

5 files changed

+16
-28
lines changed

dev/api/responses/chapters-create.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@
1010
"owned_by": 1,
1111
"updated_at": "2020-05-22T22:59:55.000000Z",
1212
"created_at": "2020-05-22T22:59:55.000000Z",
13-
"id": 74,
14-
"book": {
15-
"id": 1,
16-
"name": "BookStack User Guide",
17-
"slug": "bookstack-user-guide",
18-
"description": "This is a general guide on using BookStack on a day-to-day basis.",
19-
"created_at": "2019-05-05T21:48:46.000000Z",
20-
"updated_at": "2019-12-11T20:57:31.000000Z",
21-
"created_by": 1,
22-
"updated_by": 1
23-
},
2413
"tags": [
2514
{
2615
"name": "Category",

dev/api/responses/chapters-list.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"updated_at": "2019-09-28T11:24:23.000000Z",
1212
"created_by": 1,
1313
"updated_by": 1,
14-
"owned_by": 1
14+
"owned_by": 1,
15+
"book_slug": "example-book"
1516
},
1617
{
1718
"id": 2,
@@ -24,7 +25,8 @@
2425
"updated_at": "2019-10-17T15:05:34.000000Z",
2526
"created_by": 3,
2627
"updated_by": 3,
27-
"owned_by": 3
28+
"owned_by": 3,
29+
"book_slug": "example-book"
2830
}
2931
],
3032
"total": 40

dev/api/responses/chapters-read.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"name": "Admin",
2323
"slug": "admin"
2424
},
25+
"book_slug": "example-book",
2526
"tags": [
2627
{
2728
"name": "Category",
@@ -43,7 +44,8 @@
4344
"updated_by": 1,
4445
"draft": false,
4546
"revision_count": 2,
46-
"template": false
47+
"template": false,
48+
"book_slug": "example-book"
4749
},
4850
{
4951
"id": 7,
@@ -58,7 +60,8 @@
5860
"updated_by": 3,
5961
"draft": false,
6062
"revision_count": 1,
61-
"template": false
63+
"template": false,
64+
"book_slug": "example-book"
6265
}
6366
]
6467
}

dev/api/responses/chapters-update.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,7 @@
1010
"created_by": 1,
1111
"updated_by": 1,
1212
"owned_by": 1,
13-
"book": {
14-
"id": 1,
15-
"name": "BookStack User Guide",
16-
"slug": "bookstack-user-guide",
17-
"description": "This is a general guide on using BookStack on a day-to-day basis.",
18-
"created_at": "2019-05-05T21:48:46.000000Z",
19-
"updated_at": "2019-12-11T20:57:31.000000Z",
20-
"created_by": 1,
21-
"updated_by": 1
22-
},
13+
"book_slug": "bookstack-demo-site",
2314
"tags": [
2415
{
2516
"name": "Category",

dev/api/responses/pages-list.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"updated_at": "2020-07-04T15:50:58.000000Z",
1414
"created_by": 1,
1515
"updated_by": 1,
16-
"owned_by": 1
16+
"owned_by": 1,
17+
"book_slug": "example-book"
1718
},
1819
{
1920
"id": 2,
@@ -28,7 +29,8 @@
2829
"updated_at": "2019-06-06T12:03:04.000000Z",
2930
"created_by": 1,
3031
"updated_by": 1,
31-
"owned_by": 1
32+
"owned_by": 1,
33+
"book_slug": "example-book"
3234
},
3335
{
3436
"id": 3,
@@ -43,7 +45,8 @@
4345
"updated_at": "2019-12-18T21:56:52.000000Z",
4446
"created_by": 1,
4547
"updated_by": 1,
46-
"owned_by": 1
48+
"owned_by": 1,
49+
"book_slug": "example-book"
4750
}
4851
],
4952
"total": 322

0 commit comments

Comments
 (0)