Documentation
¶
Overview ¶
Package docs serves grain's OpenAPI specification.
The spec is generated at build time by `swag init` (see the root Makefile's `generate` target) from doc comments scattered across the HTTP handlers, then embedded into the binary via //go:embed in main.go. This package is the runtime side of that pipeline: it holds the spec bytes and serves them.
The HTML shell that consumes the spec — grain's restyled Swagger UI — lives in www/views/api-docs.html and is rendered through the standard template engine from client/registerEndpoints.go. The swagger-ui-dist JS/CSS bundle is downloaded into www/static/swagger at build time (see tests/docker/Dockerfile and the assets job in .github/workflows/release.yml). Keeping the runtime here narrow means swap-out is just an HTML rewrite, no Go changes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.