Skip to content

meta docs: type-scoped search endpoints and the OpenAPI spec route - #17

Merged
KodeStar merged 2 commits into
mainfrom
docs/meta-typed-search-openapi
Aug 7, 2026
Merged

meta docs: type-scoped search endpoints and the OpenAPI spec route#17
KodeStar merged 2 commits into
mainfrom
docs/meta-typed-search-openapi

Conversation

@KodeStar

@KodeStar KodeStar commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Documents the metaserve additions from KodeStar/audiosilo-meta#1443 on docs-developers/meta/api.md.

  • Intro: points readers at the interactive reference (https://meta.audiosilo.app/docs/api) and the machine-readable spec (https://meta.audiosilo.app/api/v1/openapi.json), noting both are the same embedded file.
  • New /api/v1/openapi.json section: OpenAPI 3.1, embedded via go:embed, registered outside the loaded-artifact gate so it never 503s, CORS-open and gzipped, path set drift-guarded against the mux registrations by TestOpenAPICoversEveryRoute.
  • New section covering /api/v1/works/search, /api/v1/people/search and /api/v1/series/search together: the shared contract stated once (q required, limit default 20 clamped [1, 50], same FTS escaping, {"results": [...]} ranked by bm25), the per-endpoint result shape by reference to the combined search's three shapes, the kind filter applied inside the query (so ?limit=20 returns 20 of that kind), and the series-position boost applying to the combined search and works/search only.

Every claim was verified against the PR diff (internal/serve/serve.go route table, internal/serve/search.go, internal/serve/openapi.go + openapi.json). No other page in docs-developers/meta/ enumerates API routes or links to an API reference, so nothing else went stale.

npm run build passes (the broken-link/anchor gate).

Pairs with KodeStar/audiosilo-meta#1443.

🤖 Generated with Claude Code

metaserve gained three type-scoped searches (/api/v1/works/search,
/api/v1/people/search, /api/v1/series/search) sharing the combined
search's contract, and /api/v1/openapi.json, the embedded OpenAPI 3.1
description of the whole public surface.

Documents the three together (one shared contract, per-kind result shape,
the kind filter applied inside the query, and the series-position boost
applying to the combined search and works/search only), adds a section
for the spec route (static, embedded, outside the loaded-artifact gate so
it never 503s, drift-guarded against the mux registrations), and points
the intro at the interactive reference on the meta site plus the spec
itself.
The API's literal route segments (works/search, works/latest, the typed
search endpoints) reserve those two words in the works, people and
series id namespaces; validation rejects them and the importers mint a
disambiguated slug instead.
@KodeStar
KodeStar force-pushed the docs/meta-typed-search-openapi branch from c9d8683 to 734d386 Compare August 7, 2026 18:28
@KodeStar
KodeStar merged commit 757b87c into main Aug 7, 2026
@KodeStar
KodeStar deleted the docs/meta-typed-search-openapi branch August 7, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant