Expand description
Build OpenAPI spec from architect.sys* tables. Exposed at GET /spec. APIs and paths come from _sys_api_entities per package; parameters and request/response body schemas are built from _sys_columns (column names, types, nullable, default). Entity and KV paths are generated dynamically by listing _sys_packages and loading each package’s config.
Functions§
- build_
spec - Build full OpenAPI spec for entity APIs: default model paths plus package-scoped paths with concrete package ids, plus KV paths with {namespace}/{key} per package.
- spec_
handler - GET /spec — return OpenAPI JSON for entity APIs. Default (unprefixed) routes come from state.model; package-scoped routes are built by listing _sys_packages and loading each package’s config from sys* tables (same source of truth as runtime routes).