bruno: regenerate collection from canonical docs + permanent docs↔Bruno parity gate

WO4. The old collection was the drifted artifact AGENTS.md warned about:
bodies pre-truncated at their first {{var}}, routes renamed server-side
but not here (/api/notes/:media_id, /api/book-matching/search,
/api/collections/:id/rules/test), an orphan universal-progress suite for
routes that no longer exist.

scripts/gen_bruno_from_docs.py emits one OpenCollection request per
frontmatter'd endpoint doc (191 requests): gate-verified example-request
JSON as body, {{env}} params per the environment file, device-token
routes get an explicit Bearer {{device_token}} header, login/register/
refresh keep the token-capture after-response scripts that chain the
collection. Old 1:1 mirrors deleted (128); hand-authored NewDevDBSetup,
environments, and edge-case suites kept. 30 scenario files with
truncated bodies (the documented corruption) deleted — they could not
run.

internal/docs/drift_test.go gains TestBrunoMirrorsDocs: every
frontmatter'd doc must have a Bruno request with matching method+URL
shape — the collection can never silently drift from the docs again.
opencollection.yml README block replaced with the real run instructions.

make test green (9 pkgs, parity test included in internal/docs).
This commit is contained in:
John O'Keefe committed 2026-10-24 18:35:51 -04:00
1 parent 6fc501b35a
commit acd82fff0a
353 files changed
+5165 -5293

No files matched your search

-40
View File
@@ -1,40 +0,0 @@
info:
name: Create Media Note
type: http
seq: 2
http:
method: POST
url: '{{base_url}}/api/media-items/{{media_item_id}}/notes'
auth: inherit
body:
type: json
data: |-
{
"content": "This is a test note about this media item.",
"position": "page:45"
}
docs: |-
## Create Media Note
Creates a new note for a specific media item.
**Method:** POST
**Endpoint:** /api/media-items/:id/notes
**Path Parameters:**
- `id` (string): Media item ID
**Request Body:**
- `content` (string): Note content (required, 1-100000 chars)
- `position` (string): Optional position reference (max 100 chars)
**Response:**
- Note object with all fields including generated ID and timestamps
**Status Codes:**
- 201: Created
- 400: Invalid request
- 401: Unauthorized
- 404: Media item not found
-31
View File
@@ -1,31 +0,0 @@
info:
name: Delete Media Note
type: http
seq: 5
http:
method: DELETE
url: '{{base_url}}/api/media-items/{{media_item_id}}/notes/{{note_id}}'
auth: inherit
body:
type: none
docs: |-
## Delete Media Note
Deletes a specific note.
**Method:** DELETE
**Endpoint:** /api/media-items/:id/notes/:noteId
**Path Parameters:**
- `id` (string): Media item ID
- `noteId` (string): Note ID
**Response:**
- 204 No Content on success
**Status Codes:**
- 204: Success
- 401: Unauthorized
- 404: Note not found
-37
View File
@@ -1,37 +0,0 @@
info:
name: Get Media Notes
type: http
seq: 1
http:
method: GET
url: '{{base_url}}/api/media-items/{{media_item_id}}/notes'
auth: inherit
body:
type: none
docs: |-
## Get Media Notes
Retrieves all notes for a specific media item for the authenticated user.
**Method:** GET
**Endpoint:** /api/media-items/:id/notes
**Path Parameters:**
- `id` (string): Media item ID
**Response:**
- Array of note objects with fields:
- `id` (string): Note ID
- `media_item_id` (string): Media item ID
- `user_id` (string): User ID
- `content` (string): Note content
- `position` (string): Optional position reference
- `created_at` (string): Creation timestamp
- `updated_at` (string): Last update timestamp
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 404: Media item not found
-31
View File
@@ -1,31 +0,0 @@
info:
name: Get Single Media Note
type: http
seq: 3
http:
method: GET
url: '{{base_url}}/api/media-items/{{media_item_id}}/notes/{{note_id}}'
auth: inherit
body:
type: none
docs: |-
## Get Single Media Note
Retrieves a specific note by ID.
**Method:** GET
**Endpoint:** /api/media-items/:id/notes/:noteId
**Path Parameters:**
- `id` (string): Media item ID
- `noteId` (string): Note ID
**Response:**
- Note object with all fields
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 404: Note not found
-41
View File
@@ -1,41 +0,0 @@
info:
name: Update Media Note
type: http
seq: 4
http:
method: PUT
url: '{{base_url}}/api/media-items/{{media_item_id}}/notes/{{note_id}}'
auth: inherit
body:
type: json
data: |-
{
"content": "This is the updated note content.",
"position": "page:47"
}
docs: |-
## Update Media Note
Updates an existing note.
**Method:** PUT
**Endpoint:** /api/media-items/:id/notes/:noteId
**Path Parameters:**
- `id` (string): Media item ID
- `noteId` (string): Note ID
**Request Body:**
- `content` (string): Updated note content (required, 1-100000 chars)
- `position` (string): Updated position reference (optional, max 100 chars)
**Response:**
- Updated note object with all fields
**Status Codes:**
- 200: Success
- 400: Invalid request
- 401: Unauthorized
- 404: Note not found
+29
View File
@@ -0,0 +1,29 @@
info:
name: Create Note
type: http
seq: 1
http:
method: POST
url: '{{base_url}}/api/media-items/{{media_item_id}}/notes'
auth: inherit
body:
type: json
data: |-
{
"content": "This is a note",
"position": "epubcfi(/6/4/2:15)",
"origin": "web"
}
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# Create Note
`POST /api/media-items/:id/notes` — auth: jwt.
Canonical reference: `docs/developer/api/notes/create_note.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
+21
View File
@@ -0,0 +1,21 @@
info:
name: Delete Note
type: http
seq: 2
http:
method: DELETE
url: '{{base_url}}/api/media-items/{{media_item_id}}/notes/{{note_id}}'
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# Delete Note
`DELETE /api/media-items/:id/notes/:noteId` — auth: jwt.
Canonical reference: `docs/developer/api/notes/delete_note.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
+21
View File
@@ -0,0 +1,21 @@
info:
name: Get Notes
type: http
seq: 3
http:
method: GET
url: '{{base_url}}/api/media-items/{{media_item_id}}/notes'
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# Get Notes
`GET /api/media-items/:id/notes` — auth: jwt.
Canonical reference: `docs/developer/api/notes/get_notes.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
+28
View File
@@ -0,0 +1,28 @@
info:
name: Update Note
type: http
seq: 4
http:
method: PUT
url: '{{base_url}}/api/media-items/{{media_item_id}}/notes/{{note_id}}'
auth: inherit
body:
type: json
data: |-
{
"content": "Updated note content",
"position": "epubcfi(/6/4/2:20)"
}
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# Update Note
`PUT /api/media-items/:id/notes/:noteId` — auth: jwt.
Canonical reference: `docs/developer/api/notes/update_note.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.