Expand description
OpenAPI document assembly and drift guards.
This module collects every #[utoipa::path] annotation into a single
document. Referenced schemas are pulled in automatically by the derive,
so this module only lists paths and tags. Two tests pin the contract:
the serialized snapshot under frontend/openapi.json must match, and
every route registered in router.rs / web.rs / web/handlers/*.rs
must have a matching annotation.
Document split: CoreDoc always applies and covers the unconditional
/v1 handlers plus all /api web handlers. VectorDoc and
FulltextDoc are feature gated and merged on top when the corresponding
cargo feature is enabled.
Standard commands (run from the workspace root):
LINKRS_REFRESH_OPENAPI=1 cargo test -p linkrs-server --features vector,fulltext openapi_snapshot_matches
cargo test -p linkrs-server --features vector,fulltextFunctionsยง
- openapi_
json - Serialize the OpenAPI document, cached after the first call.