hubvault.server.routes.meta
Metadata route factory for hubvault.server.
This module builds the small Phase 1-3 metadata router that reports server identity and the caller’s resolved access level.
The module contains:
create_meta_router()- Build the/api/v1/metarouter
create_meta_router
- hubvault.server.routes.meta.create_meta_router(*, config, api=None, api_factory=None, authorizer)[source]
Build the metadata router for the server app.
- Parameters:
config (hubvault.server.config.ServerConfig) – Server configuration bound to the current app
api (Optional[hubvault.api.HubVaultApi]) – Optional repository API reused by the router
api_factory (Optional[Callable[[], hubvault.api.HubVaultApi]]) – Optional zero-argument factory returning one fresh repository API per request
authorizer (hubvault.server.auth.TokenAuthorizer) – Shared token authorizer
- Returns:
Router exposing the metadata endpoints
- Return type:
fastapi.APIRouter
- Raises:
hubvault.optional.MissingOptionalDependencyError – Raised when the API extra is not installed.
TypeError – Raised when both
apiandapi_factoryare provided or when neither input is provided.