---
name: doc-api-routes
overview: Document the API helpers and refresh the OpenAPI spec so the public routes and helpers show up in generated docs.
todos:
  - id: doc-main
    content: Document the root and API helper functions in `src/main.rs` and `src/api/mod.rs`
    status: in_progress
  - id: doc-modules
    content: Add/expand rustdoc comments across `src/api/registry.rs`, `src/api/schema.rs`, and `src/api/pipelines.rs`
    status: in_progress
  - id: update-openapi
    content: Add `/router/registry`, `/registry`, `/schema/*`, `/openapi.yaml`, and `/docs` paths to `openapi.yaml`
    status: pending
isProject: false
---

### Goals

- Capture the current behavior of `src/main.rs` and the public API modules with richer rustdoc comments so `cargo doc` surfaces meaningful information.
- Teach clients about every live endpoint (`/`, `/router/registry`, `/registry`, `/schema/*`, `/openapi.yaml`, `/docs`) by mirroring them in `openapi.yaml`.

### Tasks

- `doc-main`: Expand documentation for `api_routes`, `ping`, `cached_health_status`, `check_scylla`, and the `/router/registry`, `/openapi.yaml`, `/docs` handlers in `src/api`.
- `doc-modules`: Document the registry helpers/routes, schema helpers/routes, and pipeline helpers so exported structs/functions describe their inputs, headers, caching, and error conditions.
- `update-openapi`: Add path definitions for `/router/registry`, `/registry`, `/registry/{api_registry_id}`, `/schema/clients`, `/schema/tables`, `/schema/columns`, `/openapi.yaml`, and `/docs` to the OpenAPI spec.
