nhi.sgit.ai / packs / static-publishing / api-docs

08 — Published API docs

PackStatic Publishing, `sgit vault serve`, and the Publishing Matrix RoleAdded 18 Aug from the maintainer's proposal: openapi.json generated from the manifest, and Swagger UI as CDN-pinned or bundled Date17–19 August 2026 · pack v0 OriginArchitect-review agent, SGit-AI__CLI repo Sourceraw markdown · original on GitHub Captured19 August 2026, at commit 2cedd9a — the raw file under src/ is byte-identical to that commit

Summary

Swagger for the published folder is two artefacts with very different costs. The spec (api/openapi.json, a few KB) is generated from manifest.json by the tool that just wrote the folder, so it cannot drift, describes only what the folder actually serves, and uses a relative server URL so it works on any host. The UI is 1.53 MB — measured at 2.7× the entire published vault it documents — so it is opt-in, with CDN-plus-SRI as the default and bundling for offline or no-third-party policies. The non-obvious security interaction: the docs page is same-origin with the loader, which may store keys, so the CDN mode requires the exact-version pin, integrity hashes, crossorigin, no-referrer, and a CSP whose connect-src 'self' means even a script that somehow ran could not exfiltrate a key.

Key concepts

Key ideas

Read the document

📄 Pack document · 08__api-docs.md · rendered from the raw markdown (the source of truth)