mirror of
https://github.com/simonw/datasette.git
synced 2026-07-08 16:44:34 +02:00
Homepage JSON returns databases as a list
/.json previously returned databases as an object keyed by database name, unlike /-/databases.json and every other collection in the API. It now returns a list of database objects. The HTML template already consumed the list. This endpoint remains undocumented. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GrHZSypDfMnym1tM5XJAFZ
This commit is contained in:
parent
13dc7a08b7
commit
5cb2bc6909
4 changed files with 17 additions and 13 deletions
|
|
@ -156,10 +156,12 @@ Endpoints disagree about the success envelope:
|
|||
|
||||
### 2a. Collection representations disagree (P2)
|
||||
|
||||
- Homepage `/.json` returns `databases` as an **object keyed by name**
|
||||
- ~~Homepage `/.json` returns `databases` as an **object keyed by name**
|
||||
(index.py:147-161); `/-/databases.json` returns an **array**; the database
|
||||
page returns `tables` as an array. Choose arrays-of-objects everywhere
|
||||
(objects-keyed-by-name break when names need ordering or pagination).
|
||||
(objects-keyed-by-name break when names need ordering or pagination).~~
|
||||
✅ **Done** — the homepage returns a list, matching `/-/databases.json`.
|
||||
The homepage JSON remains deliberately undocumented.
|
||||
- ~~Insert/upsert with `return: true` respond with `rows` (plural, list); row
|
||||
update with `return: true` responds with `row` (singular, object)
|
||||
(views/row.py:837-844). Pick one (`rows` everywhere, even for one row,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue