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:
1 parent
6fc501b35a
commit
acd82fff0a
353 files changed
+5165
-5293
No files matched your search
@@ -0,0 +1,28 @@
|
||||
info:
|
||||
name: Auto Link Books
|
||||
type: http
|
||||
seq: 1
|
||||
|
||||
http:
|
||||
method: POST
|
||||
url: '{{base_url}}/api/sync/auto-link-books'
|
||||
auth: inherit
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
{
|
||||
"confidence_threshold": 0.8,
|
||||
"limit": 100
|
||||
}
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Auto Link Books
|
||||
|
||||
`POST /api/sync/auto-link-books` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/auto_link_books.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,38 @@
|
||||
info:
|
||||
name: Bulk Link Books
|
||||
type: http
|
||||
seq: 2
|
||||
|
||||
http:
|
||||
method: POST
|
||||
url: '{{base_url}}/api/sync/bulk-link-books'
|
||||
auth: inherit
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
{
|
||||
"links": [
|
||||
{
|
||||
"unlinked_book_id": "770e8400-e29b-41d4-a716-446655440002",
|
||||
"media_item_id": "660e8400-e29b-41d4-a716-446655440001",
|
||||
"confidence_score": 0.95
|
||||
},
|
||||
{
|
||||
"unlinked_book_id": "880e8400-e29b-41d4-a716-446655440003",
|
||||
"media_item_id": "990e8400-e29b-41d4-a716-446655440004",
|
||||
"confidence_score": 0.87
|
||||
}
|
||||
]
|
||||
}
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Bulk Link Books
|
||||
|
||||
`POST /api/sync/bulk-link-books` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/bulk_link_books.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,29 @@
|
||||
info:
|
||||
name: Create Device File Alias
|
||||
type: http
|
||||
seq: 3
|
||||
|
||||
http:
|
||||
method: POST
|
||||
url: '{{base_url}}/api/devices/{{device_id}}/file-aliases'
|
||||
auth: inherit
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
{
|
||||
"media_item_id": "550e8400-e29b-41d4-a716-446655440001",
|
||||
"file_name": "book.epub",
|
||||
"file_hash": "abc123..."
|
||||
}
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Create Device File Alias
|
||||
|
||||
`POST /api/devices/:id/file-aliases` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/create_device_file_alias.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,21 @@
|
||||
info:
|
||||
name: Delete Device File Alias
|
||||
type: http
|
||||
seq: 4
|
||||
|
||||
http:
|
||||
method: DELETE
|
||||
url: '{{base_url}}/api/devices/{{device_id}}/file-aliases/{{alias_id}}'
|
||||
auth: inherit
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Delete Device File Alias
|
||||
|
||||
`DELETE /api/devices/:id/file-aliases/:aliasId` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/delete_device_file_alias.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,21 @@
|
||||
info:
|
||||
name: Get Book Matches
|
||||
type: http
|
||||
seq: 5
|
||||
|
||||
http:
|
||||
method: GET
|
||||
url: '{{base_url}}/api/books/match'
|
||||
auth: inherit
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Get Book Matches
|
||||
|
||||
`GET /api/books/match` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/get_book_matches.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,21 @@
|
||||
info:
|
||||
name: Get Device File Aliases
|
||||
type: http
|
||||
seq: 6
|
||||
|
||||
http:
|
||||
method: GET
|
||||
url: '{{base_url}}/api/devices/{{device_id}}/file-aliases'
|
||||
auth: inherit
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Get Device File Aliases
|
||||
|
||||
`GET /api/devices/:id/file-aliases` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/get_device_file_aliases.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,21 @@
|
||||
info:
|
||||
name: Get Unlinked Book Suggestions
|
||||
type: http
|
||||
seq: 7
|
||||
|
||||
http:
|
||||
method: GET
|
||||
url: '{{base_url}}/api/sync/unlinked-books/{{unlinked_book_id}}/suggestions'
|
||||
auth: inherit
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Get Unlinked Book Suggestions
|
||||
|
||||
`GET /api/sync/unlinked-books/:id/suggestions` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/get_unlinked_book_suggestions.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,21 @@
|
||||
info:
|
||||
name: Get Unlinked Books
|
||||
type: http
|
||||
seq: 8
|
||||
|
||||
http:
|
||||
method: GET
|
||||
url: '{{base_url}}/api/devices/{{device_id}}/sync/unlinked-books'
|
||||
auth: inherit
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Get Unlinked Books
|
||||
|
||||
`GET /api/devices/:deviceId/sync/unlinked-books` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/get_unlinked_books.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,33 @@
|
||||
info:
|
||||
name: Link Book
|
||||
type: http
|
||||
seq: 9
|
||||
|
||||
http:
|
||||
method: POST
|
||||
url: '{{base_url}}/api/devices/{{device_id}}/sync/link-book'
|
||||
auth: inherit
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
{
|
||||
"device_file": {
|
||||
"file_path": "/books/hobbit.epub",
|
||||
"sha256": "abc123...",
|
||||
"title": "The Hobbit"
|
||||
},
|
||||
"media_item_id": "550e8400-e29b-41d4-a716-446655440000",
|
||||
"confidence_score": 1.0
|
||||
}
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Link Book
|
||||
|
||||
`POST /api/devices/:deviceId/sync/link-book` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/link_book.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,31 @@
|
||||
info:
|
||||
name: Search Books for Matching
|
||||
type: http
|
||||
seq: 10
|
||||
|
||||
http:
|
||||
method: POST
|
||||
url: '{{base_url}}/api/sync/books/query'
|
||||
auth: inherit
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
{
|
||||
"identifiers": ["isbn:978-0345391802", "uuid:abc-123"],
|
||||
"sha256": "a1b2c3d4e5f6abc123...",
|
||||
"title": "The Hobbit",
|
||||
"author": "J.R.R. Tolkien",
|
||||
"file_size": 2456789
|
||||
}
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Search Books for Matching
|
||||
|
||||
`POST /api/sync/books/query` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/search_books.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
@@ -0,0 +1,28 @@
|
||||
info:
|
||||
name: Update Device File Alias
|
||||
type: http
|
||||
seq: 11
|
||||
|
||||
http:
|
||||
method: PUT
|
||||
url: '{{base_url}}/api/devices/{{device_id}}/file-aliases/{{alias_id}}'
|
||||
auth: inherit
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
{
|
||||
"file_name": "updated-book.epub",
|
||||
"file_hash": "newhash123..."
|
||||
}
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
|
||||
docs: |-
|
||||
# Update Device File Alias
|
||||
|
||||
`PUT /api/devices/:id/file-aliases/:aliasId` — auth: jwt.
|
||||
|
||||
Canonical reference: `docs/developer/api/book-matching/update_device_file_alias.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
|
||||
Reference in new issue
Block a user