Add board settings fields to board JSON responses (#2788)

* Add board settings fields to board JSON responses

* Move public_description fields to board partial, gate on published

* Add index test for public_description fields on published boards

* Update app/views/boards/show.json.jbuilder

Prefer `unless` to `if !`

---------

Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
This commit is contained in:
Rob Zolkos
2026-04-08 08:31:52 -04:00
committed by GitHub
parent 8201c2a4bd
commit 2a4adf3a2b
4 changed files with 64 additions and 3 deletions
+8 -2
View File
@@ -40,7 +40,7 @@ __Response:__
{
"id": "03f5v9zkft4hj9qq0lsn9ohcm",
"name": "Fizzy",
"all_access": true,
"all_access": false,
"created_at": "2025-12-05T19:36:35.534Z",
"auto_postpone_period_in_days": 30,
"url": "http://fizzy.localhost:3006/897362094/boards/03f5v9zkft4hj9qq0lsn9ohcm",
@@ -53,11 +53,17 @@ __Response:__
"created_at": "2025-12-05T19:36:35.401Z",
"url": "http://fizzy.localhost:3006/897362094/users/03f5v9zjw7pz8717a4no1h8a7"
},
"public_description": "Follow along with public product updates.",
"public_description_html": "<div class=\"trix-content\"><p>Follow along with public product updates.</p></div>",
"user_ids": [
"03f5v9zjw7pz8717a4no1h8a7",
"03f5v9zppzlksuj4mxba2nbzn"
],
"public_url": "http://fizzy.localhost:3006/897362094/public/boards/aB3dEfGhIjKlMnOp"
}
```
The `public_url` field is only present when the board is published.
The `public_description`, `public_description_html`, and `public_url` fields are only present when the board is published. The `user_ids` field is only present when `all_access` is `false`; use `GET /:account_slug/users` to resolve those IDs to user records if needed.
## `POST /:account_slug/boards`