[PR #5850] [MERGED] API: Started building comments API endpoints #6582

Closed
opened 2026-02-05 10:36:06 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5850
Author: @ssddanbrown
Created: 10/22/2025
Status: Merged
Merged: 10/24/2025
Merged by: @ssddanbrown

Base: developmentHead: comments_api


📝 Commits (7)

  • 082dbc9 API: Started building comments API endpoints
  • 3ad1e31 API: Added comment-read endpoint, added api docs section descriptions
  • cbf27d7 API: Added comment CUD endpoints, drafted tests
  • fcacf7c API: Built out tests for comment API endpoints
  • 4627dfd API: Added comment tree to pages-read endpoint
  • 9c4a922 Comments API: Addressed failing tests and static testing
  • a949900 API: Added examples for comments

📊 Changes

30 files changed (+813 additions, -55 deletions)

View changed files

📝 app/Activity/CommentRepo.php (+46 -5)
app/Activity/Controllers/CommentApiController.php (+148 -0)
📝 app/Activity/Controllers/CommentController.php (+1 -6)
📝 app/Activity/Models/Comment.php (+31 -8)
📝 app/Activity/Tools/CommentTree.php (+18 -2)
📝 app/Api/ApiDocsGenerator.php (+21 -3)
📝 app/Entities/Controllers/BookApiController.php (+1 -1)
📝 app/Entities/Controllers/PageApiController.php (+15 -3)
📝 app/Entities/Models/Entity.php (+2 -1)
📝 app/Http/ApiController.php (+6 -0)
📝 app/Permissions/Permission.php (+0 -2)
📝 app/Search/SearchRunner.php (+2 -2)
📝 database/factories/Activity/Models/CommentFactory.php (+12 -1)
database/migrations/2025_10_22_134507_update_comments_relation_field_names.php (+30 -0)
dev/api/requests/comments-create.json (+5 -0)
dev/api/requests/comments-update.json (+4 -0)
dev/api/responses/comments-create.json (+13 -0)
dev/api/responses/comments-list.json (+29 -0)
dev/api/responses/comments-read.json (+38 -0)
dev/api/responses/comments-update.json (+13 -0)

...and 10 more files

📄 Description

For #4194

Todo

  • Address TODOS in controller
  • Testing
  • Store API example requests/responses

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/5850 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 10/22/2025 **Status:** ✅ Merged **Merged:** 10/24/2025 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `comments_api` --- ### 📝 Commits (7) - [`082dbc9`](https://github.com/BookStackApp/BookStack/commit/082dbc9944e6ee1f08b16ff445b48498edfdcc1f) API: Started building comments API endpoints - [`3ad1e31`](https://github.com/BookStackApp/BookStack/commit/3ad1e31fcccd38bf864d54f4f813c81fb4574c4c) API: Added comment-read endpoint, added api docs section descriptions - [`cbf27d7`](https://github.com/BookStackApp/BookStack/commit/cbf27d70c823c696a831f1945e4a7b869af8ce65) API: Added comment CUD endpoints, drafted tests - [`fcacf7c`](https://github.com/BookStackApp/BookStack/commit/fcacf7cacbea1b9b667cf694ae92d611ad5b9e3b) API: Built out tests for comment API endpoints - [`4627dfd`](https://github.com/BookStackApp/BookStack/commit/4627dfd4f7ead66cba4ba2e042f0417c4a5db853) API: Added comment tree to pages-read endpoint - [`9c4a922`](https://github.com/BookStackApp/BookStack/commit/9c4a9225af6f7fdcaf8494e8562197d831d25237) Comments API: Addressed failing tests and static testing - [`a949900`](https://github.com/BookStackApp/BookStack/commit/a949900570c80c9c46c140a57c17e2d42738232e) API: Added examples for comments ### 📊 Changes **30 files changed** (+813 additions, -55 deletions) <details> <summary>View changed files</summary> 📝 `app/Activity/CommentRepo.php` (+46 -5) ➕ `app/Activity/Controllers/CommentApiController.php` (+148 -0) 📝 `app/Activity/Controllers/CommentController.php` (+1 -6) 📝 `app/Activity/Models/Comment.php` (+31 -8) 📝 `app/Activity/Tools/CommentTree.php` (+18 -2) 📝 `app/Api/ApiDocsGenerator.php` (+21 -3) 📝 `app/Entities/Controllers/BookApiController.php` (+1 -1) 📝 `app/Entities/Controllers/PageApiController.php` (+15 -3) 📝 `app/Entities/Models/Entity.php` (+2 -1) 📝 `app/Http/ApiController.php` (+6 -0) 📝 `app/Permissions/Permission.php` (+0 -2) 📝 `app/Search/SearchRunner.php` (+2 -2) 📝 `database/factories/Activity/Models/CommentFactory.php` (+12 -1) ➕ `database/migrations/2025_10_22_134507_update_comments_relation_field_names.php` (+30 -0) ➕ `dev/api/requests/comments-create.json` (+5 -0) ➕ `dev/api/requests/comments-update.json` (+4 -0) ➕ `dev/api/responses/comments-create.json` (+13 -0) ➕ `dev/api/responses/comments-list.json` (+29 -0) ➕ `dev/api/responses/comments-read.json` (+38 -0) ➕ `dev/api/responses/comments-update.json` (+13 -0) _...and 10 more files_ </details> ### 📄 Description For #4194 ### Todo - [x] Address TODOS in controller - [x] Testing - [x] Store API example requests/responses --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:36:06 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6582