Skip to main content

Module api

Module api 

Source
Expand description

REST API handlers — direct /v1/* routes plus public health/status docs.

All handlers are thin: parse HTTP input, call SomaApplication, return JSON.

Structs§

CapabilitiesResponse
EchoRequest
GreetRequest
RestRoute

Constants§

REST_ROUTES

Functions§

build_openapi_document
Refresh, build, and gateway-augment the OpenAPI document, returning the raw Value rather than a Response. openapi_json wraps this directly; the composition root (apps/soma) also calls it so it can layer its own route augmentation (e.g. Palette’s /v1/palette/*) on top without soma-api depending on a peer product-surface crate.
health
GET /health — liveness probe (unauthenticated).
openapi_json
GET /openapi.json — generated OpenAPI schema for the REST surface.
readyz
GET /readyz — readiness probe (unauthenticated).
status
GET /status — local runtime status (unauthenticated, redacts secrets).
v1_capabilities
v1_dynamic_provider_route
v1_echo
v1_greet
v1_help
v1_provider_tool_action
v1_providers
v1_service_status