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).
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
opencollection: 1.0.0
|
|
|
|
info:
|
|
name: Bookhoard
|
|
config:
|
|
proxy:
|
|
inherit: true
|
|
config:
|
|
protocol: http
|
|
hostname: ""
|
|
port: ""
|
|
auth:
|
|
username: ""
|
|
password: ""
|
|
bypassProxy: ""
|
|
|
|
request:
|
|
auth:
|
|
type: bearer
|
|
token: "{{token}}"
|
|
|
|
docs:
|
|
content: |-
|
|
# Bookhoard API — executable verification (OpenCollection / Bruno)
|
|
|
|
Every request in this collection is GENERATED from the canonical API
|
|
docs (docs/developer/api/**). Do not hand-edit request files — edit
|
|
the doc and re-run scripts/gen_bruno_from_docs.py --apply.
|
|
|
|
Hand-authored exceptions (not generated):
|
|
- NewDevDBSetup/ — ordered dev-database bootstrap sequence
|
|
- */scenarios/, media-items/filters, media-items/search — edge-case suites
|
|
- environments/Bookhoard.yml — variables
|
|
|
|
Run order: NewDevDBSetup (RegisterUser captures {{token}}), then any
|
|
request. Device-token routes (kobo/koreader/opds) need {{device_token}}
|
|
or {{kobo_device_token}} in the environment.
|
|
|
|
The docs site (Developer → API) is the single source of truth for
|
|
shapes; internal/docs/drift_test.go enforces docs-to-routes and
|
|
docs-to-Bruno parity.
|
|
type: text/markdown
|
|
bundled: false
|
|
extensions: {}
|