]> BookStack Code Mirror - bookstack/commitdiff
API Docs: Add book_slug to Example Responses
authorThomas Kuschan <redacted>
Fri, 30 Jun 2023 07:33:53 +0000 (09:33 +0200)
committerThomas Kuschan <redacted>
Fri, 30 Jun 2023 07:33:53 +0000 (09:33 +0200)
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
dev/api/responses/chapters-list.json
dev/api/responses/chapters-read.json
dev/api/responses/chapters-update.json
dev/api/responses/pages-list.json

index aff2f4238389e1686bdd1c60cca63f9329ef2be2..4dbc764b157d29b035edf6407a2dc2dacd3b4cef 100644 (file)
   "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",
index dc6dde100f397e0062d82824852f4ff50fa7de7e..c3dc98b9c54f70cfcc9c26baf79d98108eced03f 100644 (file)
@@ -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
index 7e629fee8cd02333dee8d55ba5b2d958ad7c3a68..75c324a611e4cebe76801bf16af0b12916d2eb6a 100644 (file)
@@ -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
index b470249bec6b37276ddb1713949cf8b5e9162525..cc454d74086bad6705bda16dd2021226440192f5 100644 (file)
   "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",
index 2ff4aeb3a82f16eb8dc97008479e40d23a0215dd..2b465c9782716a564a24d18995d85f6b58ee05c6 100644 (file)
@@ -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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.